Return to BSD News archive
Newsgroups: comp.unix.bsd Path: sserve!manuel!munnari.oz.au!uunet!mcsun!sun4nl!eur.nl!pk From: pk@cs.few.eur.nl (Paul Kranenburg) Subject: [386BSD] init leaves improper signal mask Message-ID: <1992Sep4.160146.6295@cs.few.eur.nl> Keywords: init, signals Sender: news@cs.few.eur.nl Reply-To: pk@cs.few.eur.nl Organization: Erasmus University Rotterdam Date: Fri, 4 Sep 1992 16:01:46 GMT Lines: 26 init doesn't set up the proper signal disposition for the process (sh) it creates to run /etc/rc. While all signal handlers are reset to SIG_DFL, the signal mask is left unchanged causing SIGHUP and SIGTERM to be masked in all daemons started from /etc/rc. This can be fixed by adding a `sigsetmask(0)' to the macro SIGNALSFORCHILD in init.c. This makes "kill -HUP `cat /var/run/syslog.pid`" work again. -pk Diffs of my current init.c against the original distribution: ------- init.c ------- 83c83,84 < signal(SIGTTIN, SIG_DFL); signal(SIGTTOU, SIG_DFL); --- > signal(SIGTTIN, SIG_DFL); signal(SIGTTOU, SIG_DFL); \ > sigsetmask(0); 217c218 < while(wait(&status) != pid) --- > while(wait(&status) != pid); 399c400 < exit(1); --- > _exit(1);