Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 7/7/83; site rlgvax.UUCP Path: utzoo!linus!philabs!seismo!rlgvax!guy From: guy@rlgvax.UUCP Newsgroups: net.unix-wizards Subject: Re: Missing a signal and pausing forever Message-ID: <800@rlgvax.UUCP> Date: Fri, 8-Jul-83 19:51:27 EDT Article-I.D.: rlgvax.800 Posted: Fri Jul 8 19:51:27 1983 Date-Received: Sat, 9-Jul-83 17:30:07 EDT References: <567@hou5d.UUCP>, <364@qubix.UUCP> Organization: CCI Office Systems Group, Reston, VA Lines: 25 4.?BSD does have such a facility for "raising the interrupt priority" of a process and lowering it later, with the new signal mechanism. Saying sigsys(sig, SIG_HOLD); causes the signal to be remembered if it occurs, but not be presented to the process; if the process changes the action for the signal, it is presented to the process (or discarded if the action is changed to SIG_IGN). Furthermore, you set the "interrupt new PSW" for the signal to set the signal to SIG_HOLD rather than SIG_DFL by saying sigsys(sig, DEFERSIG(routine)); which means that the signal action is reset to SIG_HOLD when "routine" is entered. There are also facilities for dismissing signals more cleanly. The UNIX signal mechanism does need work to make it useful for general inter-process communication; UNIX also needs block-wakeup and message mechanisms, both of which are in USG UNIX 5.0 (semaphores, message queues) and the latter of which is in 4.1c/4.2BSD - the former can be simulated under 4.1c/4.2 with exclusive-use opens on a file. 4.1c/4.2 also has a more elaborate signal mechanism. Guy Harris {seismo,mcnc,we13,brl-bmd,allegra}!rlgvax!guy