killing daemons

Chris Calabrese[rs] cjc at ulysses.homer.nj.att.com
Fri Feb 19 01:28:01 AEST 1988


In article <20917 at bbn.COM>, mesard at 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



More information about the Comp.unix.questions mailing list