Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: net.lang.c++ Subject: Re: Re-entrancy Re-visited Message-ID: <6490@utzoo.UUCP> Date: Tue, 11-Mar-86 17:34:05 EST Article-I.D.: utzoo.6490 Posted: Tue Mar 11 17:34:05 1986 Date-Received: Tue, 11-Mar-86 17:34:05 EST References: <34200005@orstcs.UUCP>, <6812@boring.UUCP> Organization: U of Toronto Zoology Lines: 14 > The only safe things to do in an interrupt routine are > - setting the InterruptHasOccurred flag, > - longjmp > - exit. Actually, neither longjmp nor exit is 100% safe. Longjmp will get you out fairly safely (unless your function-calling sequence has an interrupt window, like the V7 pdp11 one did [fixed in SysV]), but things may still be in a mess inside whatever was interrupted, with disastrous results the next time you call it. And exit invokes stdio's cleanup routine, which might run afoul of the same problem. _exit should be safe. -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,linus,decvax}!utzoo!henry