Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!pasteur!ucbvax!ulysses!cjc From: cjc@ulysses.homer.nj.att.com (Chris Calabrese[rs]) Newsgroups: comp.unix.questions Subject: Re: killing daemons Message-ID: <10096@ulysses.homer.nj.att.com> Date: 18 Feb 88 15:28:01 GMT References: <20917@bbn.COM> Organization: AT&T Bell Laboratories, Murray Hill Lines: 18 Summary: hup In article <20917@bbn.COM>, mesard@bbn.com (Wayne Mesard) writes: > During execution it occasionally checks to see if the parent is > still around, and commits suicide if it isn't: > > if (kill(ppid, 0)) > exit(0); If the parent of this deamon is the shell, it should receive the hangup signal upon the termination of the shell through logging out. This should make it unnessary to commit suicide at all, as it's done for you. Of course, you can always catch the signal and do some additional processing. Chris Calabrese AT&T Bell Laboratories ulysses!cjc