rlogind and background processes
jim at haring.UUCP
jim at haring.UUCP
Sat Nov 17 04:06:39 AEST 1984
> - in login.c, add a signal(SIGHUP,SIG_DFL) before the user's
> login shell is invoked. This is necessary because getty's and
> login's that are invoked from daemons (such as rlogind and chserver)
> apparently have SIGHUP ignored.
> Mark Plotnick
> Society for the Prevention of Cruelty to Processes
This interested me, as I could find no justification for it. However,
things became clearer when I realised that we are running two different
versions of /etc/inetd (the Internet super-server) on our systems, an
old one from SUN and a new one from Berkeley. Daemons spawned by the new
one do not have SIGHUP ignored, but the old ones do. This is because the
new inetd has a SIGHUP catch routine, whereas the old one doesn't and just
inherits it from its parent (/etc/init). This lead me to the discovery
that anything spawned from /etc/rc has SIGHUP ignored, due to the routine
'shutdown' in /etc/init being called right at the beginning, which sets
SIGHUP.
Now, the question is, is this intentional? If it is, then the processes
spawned by /etc/rc should take note of it, if it isn't, then /etc/init
should be fixed.
Jim McKie Centrum voor Wiskunde en Informatica, Amsterdam mcvax!jim
More information about the Comp.unix.wizards
mailing list