Inexplicable 2.9BSD crashes (more info)
Johan Wide'n
johanw at ttds.UUCP
Sat Jun 1 03:10:45 AEST 1985
One thing too watch out for is a bad /etc/init. /etc/init as delivered
to us did not reset several signals before execing other programs.
This bug was pointed out by (ihnp4!inuxc!isrnix!greg)
>Received: by isrnix.UUCP; Wed, 13 Jun 84 18:03:38 EST
>To: BERKELEY!2bsd-people
>Subject: 2.9 problem
>
>
> I'm having a problem with 2.9 - I am getting spurious signals sent
>to all the processes - the signal is signal 9 (I'm almost sure) and
>init (proc 1) does not get it (although everything else does). Has
>anyone else seen this? I have VFORK and MENLO_JCL turned on f.y.i.
>Any ideas?
---------------
>Received: by isrnix.UUCP; Thu, 14 Jun 84 18:11:15 EST
>To: BERKELEY!2bsd-people
>Subject: My earlier message about interrupts.
>
>
> Found the culprit -
>
> There is a bug in our distributed version of init.c. In dofork and
>runcom you should add the signal calls
>
> signal(SIGINT, DIG_DFL);
> and
> signal(SIGTERM, SIG_DFL);
>
>Greg
So: check out your /usr/src/cmd/init.c.
Here is a context diff:
*** init.c.org Wed May 18 20:54:04 1983
--- init.c Fri Apr 26 16:13:28 1985
***************
*** 201,206
pid = fork();
if(pid == 0) {
open("/", 0);
dup(0);
dup(0);
--- 201,208 -----
pid = fork();
if(pid == 0) {
+ signal(SIGTERM, SIG_DFL);
+ signal(SIGINT, SIG_DFL);
open("/", 0);
dup(0);
dup(0);
***************
*** 205,210
dup(0);
dup(0);
#ifdef UCB_AUTOBOOT
if ((howto & RB_SINGLE) || (howto & RB_NOFSCK))
arg1 = "fastboot";
else
--- 207,213 -----
dup(0);
dup(0);
#ifdef UCB_AUTOBOOT
+ signal(SIGQUIT, SIG_DFL);
if ((howto & RB_SINGLE) || (howto & RB_NOFSCK))
arg1 = "fastboot";
else
***************
*** 413,418
pid = fork();
if(pid == 0) {
signal(SIGTERM, SIG_DFL);
signal(SIGHUP, SIG_IGN);
strcpy(tty, dev);
strncat(tty, p->line, LINSIZ);
--- 416,425 -----
pid = fork();
if(pid == 0) {
signal(SIGTERM, SIG_DFL);
+ signal(SIGINT, SIG_DFL);
+ #ifdef UCB_AUTOBOOT
+ signal(SIGQUIT, SIG_DFL);
+ #endif
signal(SIGHUP, SIG_IGN);
strcpy(tty, dev);
strncat(tty, p->line, LINSIZ);
johanw at ttds Johan Widen
More information about the Comp.bugs.2bsd
mailing list