signal handling in 4.2: Is this still UNIX?

ka at hou3c.UUCP ka at hou3c.UUCP
Fri Dec 9 08:44:19 AEST 1983


Come on, Spenser.  Hardware interrupts don't interrupt system calls
because user programs have nothing to do with them.  The PDP-11
provides, and the kernel uses, a wait instruction which is term-
inated by an interrupt.

I don't want to quit out of "whatever is going on"; I want to quit
out of a read if the user types an interrupt.  Yes, it is possible
to use longjmp, but the resulting code will be convoluted and
difficult to maintain.  Remember that if an interrupt arrives while
another signal is being processed and the interrupt handler does a
longjmp then the other signal handler will never be completed,
so that kludges have to be devised to make these signal handlers
work properly even if they are chopped off in the middle.  Not
very easy to do.

Actually, my biggest objection to the change in signal handling is
that it is different from other UNIXes.  I am not saying that
Berkeley shouldn't be making improvements to UNIX.  But this
change provides no new functionality.  It makes it unnecessary
to check for interrupted system calls, but if the program is
to be portable to other versions of UNIX, the checks have to
be included anyway.  If being able to share software between
systems is important, then Berkeley's change to the signal mechanism
is a bad idea.
				Kenneth Almquist


* UNIX is a trademark of Bell Telephone laboratories, Inc.



More information about the Comp.unix.wizards mailing list