Xref: utzoo comp.mail.misc:2321 comp.unix.xenix:7366 comp.unix.wizards:17902 Path: utzoo!attcan!utgpu!watmath!iuvax!purdue!bu-cs!encore!multimax.UUCP From: jdarcy@multimax.UUCP (Jeff d'Arcy,OS Avenue,2627,) Newsgroups: comp.mail.misc,comp.unix.xenix,comp.unix.wizards Subject: Re: Checking for new mail (and killing bkgnd process on logout?) Message-ID: <9834@multimax.Encore.COM> Date: 30 Aug 89 15:51:55 GMT References: <1989Aug30.053137.2047@ctr.columbia.edu> Followup-To: comp.mail.misc Lines: 16 seth@ctr.columbia.edu (Seth Robertson): > Sure, Modify checkmail so that does the following: > > if (kill(ppid,0)) > exit(1); > > So every so often, it checks to see if its parent is around. If > it isn't, it performs honorable suicide. This is an approach I'd tried earlier (I used SIGCHLD, actually) and it worked OK, but I wasn't comfortable with the possibility that the parent might try to do something with the signal instead of dropping it. That's when I thought of comparing initial vs. current PPIDs. Jeff d'Arcy jdarcy@encore.com (508) 460-0500 x2627 I am solely responsible for my own opinions, and not at all for others'