help with signals (ultrix)

Wolfgang Rupprecht wolfgang at mgm.mit.edu
Sun Mar 6 02:04:27 AEST 1988


In article <1583 at boulder.Colorado.EDU> cdash at boulder.Colorado.EDU (Charles Shub) writes:
>on at&t unix if a system call to (eg) read is in progress when a signal
>occurs, the system call fails. On sun unix and ultrix, the system call
>restarts. On the sun, one can use siginterrupt(3) to make the system call
>fail. How do I make the system call fail under ultrix???????

Another (hack) way to do this involves a setjump/longjump pair. Put a
setjump around the system call, set a signal handler for the signal in
question, and finally put a longjump in the signal handler to the
setjump saved point. (Don't forget to take down the signal handler
after use, or else you will find yourself longjumping back to the same
section of code everytime a signal of that type comes in.)

--
Wolfgang Rupprecht	ARPA:  wolfgang at mgm.mit.edu (IP 18.82.0.114)
326 Commonwealth Ave.	UUCP:  mit-eddie!mgm.mit.edu!wolfgang
Boston, Ma. 02115	TEL:   (617) 267-4365



More information about the Comp.unix.wizards mailing list