On Tue 22 Mar 2011 14:26, Ian Price <ianpric...@googlemail.com> writes:
> If you run (exit) at the repl, it is caught, and any after-thunks from > dynamic-wind will be called when you continue with ,q . However, in a > guile script, it is not an error, and the after-thunks are not > called. I have tracked this down and it seems that this was the case in 1.8 as well. The issue is that when you run a script, the default catch-all ends up being provided by scm_c_with_continuation_barrier. This procedure uses scm_handle_by_message_noexit as the pre-unwind handler, and that procedure in turn does an `exit' if the key is `quit'. However this sounds bogus to me: usually you would want to unwind. Furthermore you probably want to print the message using the ports that were current at the time of the with-continuation-barrier, not the throw. This change first appeared in 43e01b1ee350c823505d1397a306c8e1bfa31469, in 2006, and appears to be a misunderstanding. I have pushed something that causes the stack to be unwound before exiting. Please let me know if you still see problems. Thanks, Andy -- http://wingolog.org/