[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: exit-hook never executed
From: |
Jean Abou Samra |
Subject: |
Re: exit-hook never executed |
Date: |
Fri, 30 Sep 2022 17:48:18 +0200 |
Oh dear, I sent my reply to the wrong list and now we’re discussing on
lilypond-user instead of guile-user. Sorry LilyPond folks, this was not for
this list. Forwarding to guile-user, please remove lilypond-user when replying.
> Le 30 sept. 2022 à 17:35, Olivier Dion <olivier.dion@polymtl.ca> a écrit :
>
> On Sun, 25 Sep 2022, Jean Abou Samra <jean@abou-samra.fr> wrote:
>
>> It looks like Guile only uses exit-hook for (ice-9 readline), so it
>> doesn't bother to call it when not running as REPL.
>
> Right it looks like it.
>
>> Maybe you could use a finalizer attached to a C global variable?
>> (I didn't test.)
>
> I don't think finalizer would be good enough since there's no guaranteed
> that it's called? I've opted for a syntax rule that expand into a
> dynamic wind.
>