🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.c++
Article #82

Re: Re-entrancy Re-visited

#82
From: Henry Spencer
Date: Tue, 11 Mar 1986 22:34
14 lines
1160 bytes
> 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
Technical Details
Message-ID: <6490@utzoo.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!henry
References: <34200005@orstcs.UUCP>, <6812@boring.UUCP>

Show Full Headers
Complete Article Headers
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: arc1-ca.pugleaf.net!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