Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site hou3c.UUCP Path: utzoo!linus!security!genrad!mit-eddie!mit-vax!eagle!harpo!floyd!clyde!burl!hou3c!ka From: ka@hou3c.UUCP Newsgroups: net.unix-wizards Subject: Re: signal handling in 4.2: Is this still UNIX? Message-ID: <135@hou3c.UUCP> Date: Thu, 8-Dec-83 17:44:19 EST Article-I.D.: hou3c.135 Posted: Thu Dec 8 17:44:19 1983 Date-Received: Sat, 10-Dec-83 22:00:32 EST References: <651@cbosgd.uucp> utcsstat.1502 <1010@utah-gr.UUCP> Organization: Bell Labs, Holmdel, NJ Lines: 28 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.