Return to BSD News archive
Path: sserve!manuel!munnari.oz.au!mips!mips!swrinde!cs.utexas.edu!uwm.edu!ogicse!das-news.harvard.edu!husc-news.harvard.edu!burrhus!ddl From: ddl@burrhus.harvard.edu (Dan Lanciani) Newsgroups: comp.unix.bsd Subject: Re: init, rc, signal handling (386BSD) Message-ID: <1992Aug14.015953.11306@burrhus.harvard.edu> Date: 14 Aug 92 01:59:53 GMT References: <1992Aug13.103235.25465@ucc.su.OZ.AU> Organization: Harvard University, Cambridge, MA Lines: 24 In article <1992Aug13.103235.25465@ucc.su.OZ.AU>, dawes@physics.su.OZ.AU (David Dawes) writes: | | I've noticed that signal handling gets screwed up for commands run from | /etc/rc. One particular example is xdm. When started from /etc/rc | the signal handlers it installs don't work -- the signals get ignored. | I checked the init source, and it resets the signal handling the SIG_DFL. | | I tried a simple program which checks this, and the default handler's are | correctly set -- but signals are being ignored regardless of the default | behaviour or if a handler is installed. | | This is making it impossible to shutdown xdm cleanly when it is started | at boot time from /etc/rc. | | Does anyone have any ideas about this? I have at least one idea. In the process of ``cleaning up'' the code, it appears that someone deleted several sigsetmask(0L) calls. So, assuming the mask isn't reset by fork or exec these days, /etc/rc is being run with init's signal mask which blocks SIGHUP and SIGTERM. (Hint hint: please comment these little changes so people don't blame me. :) Dan Lanciani ddl@harvard.*