Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!cit-vax!oberon!sdcrdcf!ism780c!tim From: tim@ism780c.UUCP Newsgroups: comp.emacs,comp.unix.questions,comp.unix.wizards Subject: Re: faster way to "ps lct" (bsd4.x) from C? Message-ID: <5996@ism780c.UUCP> Date: Fri, 17-Apr-87 21:01:33 EST Article-I.D.: ism780c.5996 Posted: Fri Apr 17 21:01:33 1987 Date-Received: Sun, 19-Apr-87 01:16:30 EST References: <11634@teknowledge-vaxc.ARPA> Reply-To: tim@ism780c.UUCP (Tim Smith) Distribution: na Organization: Interactive Systems Corp., Santa Monica CA Lines: 18 Keywords: ps emacs pid ppid job control Xref: utgpu comp.emacs:781 comp.unix.questions:1751 comp.unix.wizards:1795 In an article, Michael Khaw writes: < So, I want to modify emacs so it checks to see if its parent process has any < other children that are emacs and tell the user about them. . < The only way I've found to do the trick is to popen("/bin/ps lct", "r"), and [ he says that this is too slow ] How about having emacs maintain a file in /tmp for each user that contains the pid and ppid of each running emacs? At startup, it could check the file, and then add an entry for itself. When it exits, it can remove that entry.. -- Tim Smith "Hojotoho! Hojotoho! uucp: sdcrdcf!ism780c!tim Heiaha! Heiaha! Delph or GEnie: Mnementh Hojotoho! Heiaha!" Compuserve: 72257,3706