chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] add R7RS support for exit and emergency-ex


From: John Cowan
Subject: Re: [Chicken-hackers] [PATCH] add R7RS support for exit and emergency-exit
Date: Tue, 28 May 2013 10:13:57 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

Evan Hanson scripsit:

> Also, I believe CHICKEN's exit procedures are still not technically
> R7RS-compliant even given these changes, since a user-specified
> `exit-handler` or `on-exit` procedure may signal an error, contain a
> non-local escape or simply refuse to exit, all of which are verboten by
> the draft. I think this is probably OK, but others may feel differently.

The draft merely says "The exit procedure must not signal an exception or
return to its continuation."  Nothing is said about dynamic-wind handlers
not doing so; it is the programmer's responsibility to avoid situations
where the process cannot even die.  The essential point is that `exit`
shouldn't, say, print a warning that it can't interpret its argument
and then carry on by calling its continuation.

Note that emergency-exit should wind up calling _exit() rather than
exit(), so that stdio buffers are not flushed.  This is particularly
important in a forked process; otherwise, shared buffers will be flushed
twice.

-- 
John Cowan    http://ccil.org/~cowan    address@hidden
SAXParserFactory [is] a hideous, evil monstrosity of a class that should
be hung, shot, beheaded, drawn and quartered, burned at the stake,
buried in unconsecrated ground, dug up, cremated, and the ashes tossed
in the Tiber while the complete cast of Wicked sings "Ding dong, the
witch is dead."  --Elliotte Rusty Harold on xml-dev



reply via email to

[Prev in Thread] Current Thread [Next in Thread]