Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 (Tek) 9/26/83; site hammer.UUCP Path: utzoo!linus!security!genrad!decvax!tektronix!orca!hammer!steveg From: steveg@hammer.UUCP (Steve Glaser) Newsgroups: net.unix-wizards Subject: Re: longjmp + signal may cause problems Message-ID: <391@hammer.UUCP> Date: Tue, 6-Dec-83 22:16:49 EST Article-I.D.: hammer.391 Posted: Tue Dec 6 22:16:49 1983 Date-Received: Fri, 9-Dec-83 04:08:22 EST References: <304@decvax.UUCP> Organization: Tektronix, Wilsonville OR. Lines: 13 Actually, a somewhat more serious race condition in the first example (where the signal handler did a longjmp to exit things) is that you could get the signal before the setjmp ever finished executing and thus end up doing a longjmp to somewhere random. If you make the assumptions that there's a human on the other end of things and that computers are relatively fast, it's not very likely to cause a problem, but relatively easy to fix - just make sure you don't enable the signal catcher until after the setjmp. Steve Glaser [tektronix|teklabs]!steveg UUCP steveg.tektronix@rand-relay ARPANET/CSNET