[Top][All Lists]

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

Re: exit & dynamic wind

From: Andy Wingo
Subject: Re: exit & dynamic wind
Date: Thu, 24 Mar 2011 20:23:04 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

On Tue 22 Mar 2011 14:26, Ian Price <address@hidden> 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

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

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.



reply via email to

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