[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-hackers] [PATCH] add R7RS support for exit and emergency-exit
From: |
Evan Hanson |
Subject: |
[Chicken-hackers] [PATCH] add R7RS support for exit and emergency-exit |
Date: |
Tue, 28 May 2013 04:24:08 -0700 |
User-agent: |
OpenSMTPD enqueuer (Demoosh) |
This patch adds (I believe) almost-R7RS support for the `exit` and
`emergency-exit` procedures. Specifically, it allows `exit` to accept an
arbitrary object as its argument, causes `exit` to run all finalizers
and pending dynamic-wind after-thunks before exiting (by default;
defining an `exit-handler` overrides this behavior as before), and adds
the `emergency-exit` procedure which does not.
The exit status translation follows the usual Scheme falsity rules (#f
causes an exit with a status of 1, everything else exits 0), with the
exception of integers which, in the interest of backwards-compatability
(and also the need to return other exit statuses to the OS), are passed
along directly. There are probably more creative things one could do
here, but this behavior makes sense to me.
The second patch just fixes some macro un/hygiene tests that had relied
on exit's old behavior.
I think I've gotten these right, but they should obviously be looked at
carefully. If you can't trust software to stop, can you trust it at all?
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.
Evan
0001-add-R7RS-support-for-exit-and-emergency-exit.patch
Description: Text document
0002-update-syntax-hygiene-tests-to-account-for-R7RS-exit.patch
Description: Text document
- [Chicken-hackers] [PATCH] add R7RS support for exit and emergency-exit,
Evan Hanson <=