Checking for new mail (and killing bkgnd process on logout?)

Jeff d'Arcy,OS Avenue,2627, jdarcy at multimax.UUCP
Thu Aug 31 01:51:55 AEST 1989


seth at 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 at encore.com		(508) 460-0500 x2627
  I am solely responsible for my own opinions, and not at all for others'



More information about the Comp.unix.wizards mailing list