Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!samsung!uunet!pdn!tscs!tct!chip From: chip@tct.uucp (Chip Salzenberg) Newsgroups: comp.unix.wizards Subject: Re: Trying to kill a daemon at logout time Message-ID: <26407335.5C1C@tct.uucp> Date: 3 May 90 18:06:45 GMT References: <1990Apr25.021104.7438@world.std.com> <6E13XN4xds13@ficc.uu.net> <1990May2.015939.8336@world.std.com> Distribution: usa Organization: ComDev/TCT, Sarasota, FL Lines: 19 According to madd@world.std.com (jim frost): >peter@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 ,