init

Kevin "Mr. Boots" Ruddy smiles at lsrhs.UUCP
Tue Jan 7 06:56:19 AEST 1986


There is apparently a very interesting (and annoying) bug in 2.9's init, or
so we have encountered.  If ^C is hit in between when init forks and when
getty is exec'd, SIGINT is sent to init.  Sometimes this even happened to
running login's.

This bug should be able to be reproduced by repeatedly hitting ^C at any
currently running getty or login.  The result of this is that init's child
thinks it's going into special session.  It logs everyone out and is a
rather nasty problem.  (A question: when this happens, it sometimes happens
that not everyone is logged out.  Why would kill(-1, SIGKILL) not always
work?)

The best fix for this would be this: after init forks in dfork(), have
it firstly setpgrp(0, getpid()).  This should solve all problems.  For
some odd reason, when we do this, and compile -ljobs, init "breaks" and
things go temporarily haywire, and it becomes impossible to log in.
Our second solution was to signal(SIGINT, SIG_DFL), rather than setpgrp().
This seems to have fixed the problem.

Has anyone else experienced this problem?  It became very annoying when
we started to use the 'B' option in getty, and people tried to set speeds
by hitting ^C many times in a row ...
--
ADDR: Kevin Ruddy, 42 Pantry Road, Sudbury MA  01776
UUCP: {genrad!grkermit,harvard!wjh12,bbncca,mit-eddie!frog}!lsrhs!smiles
ARPA: lsrhs!smiles at bbncca.arpa



More information about the Comp.bugs.2bsd mailing list