Trying to kill a daemon at logout time
Chip Salzenberg
chip at tct.uucp
Fri May 4 04:06:45 AEST 1990
According to madd at world.std.com (jim frost):
>peter at ficc.uu.net (Peter da Silva) writes:
>> signal(SIGHUP, exit);
>
>Doesn't happen under csh background processes. (I call that a
>"feature" :-).
It *does* happen -- under V7, SysVr0, SysVr1, SysVr2 and their
derivatives, such as Xenix.
Without a signal mask, the only protection a background task has
against SIGHUP is the signal(SIGHUP, SIG_IGN) call done in csh. Once
you've overridden the SIG_IGN, you'll get the SIGHUP. Of course,
there's no guarantee that you'll call signal() in time. :-(
Of course, BSD and SysVr4 have signal masks, so for those
environments, Jim is right. SysVr3? Who knows? :-)
--
Chip Salzenberg at ComDev/TCT <chip%tct at ateng.com>, <uunet!ateng!tct!chip>
More information about the Comp.unix.wizards
mailing list