Xref: utzoo comp.unix.questions:5964 comp.unix.wizards:6872 Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mgm.mit.edu!wolfgang From: wolfgang@mgm.mit.edu (Wolfgang Rupprecht) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: help with signals (ultrix) Message-ID: <3502@bloom-beacon.MIT.EDU> Date: 5 Mar 88 16:04:27 GMT References: <1583@boulder.Colorado.EDU> Sender: daemon@bloom-beacon.MIT.EDU Reply-To: wolfgang@mgm.mit.edu (Wolfgang Rupprecht) Organization: Freelance Software Consultant, Boston, Ma. Lines: 16 Keywords: signal, system call restart/failure In article <1583@boulder.Colorado.EDU> cdash@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@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