GNU bug report logs -
#10581
exit-hook is undocumented and is not called from a non-interactive environment
Previous Next
Full log
Message #14 received at 10581 <at> debbugs.gnu.org (full text, mbox):
On Sun, Feb 5, 2012 at 06:50, Andy Wingo <wingo <at> pobox.com> wrote:
> Hi Andrew,
>
> On Sun 22 Jan 2012 20:58, Andrew Psaltis <ampsaltis <at> gmail.com> writes:
>
>> After doing some web searches, I found an answer in "exit-hook",
>> except that it was not clear from the Guile reference manual that it
>> existed. It should probably be documented a little more clearly.
>
> It's not documented at all, actually. It was added in 1998 to
> boot-9.scm with the following comment:
>
> ;;; This hook is run at the very end of an interactive session.
> ;;;
> (define exit-hook (make-hook))
>
> It has not been changed since then.
>
Ah, yes.
>> When I write a scheme script that adds some function to exit-hook, it
>> is not invoked from a non-interactive call to guile.
>
> Indeed, as the comment notes.
>
> I think it's fair to say that this is a historical interface, and that
> it probably shouldn't be changed.
>
> Why not use atexit(), if you need to clean up the C library? Just
> wondering.
>
That would be because I forgot that it existed. I probably should
just use that instead.
Thanks.
~Andrew
This bug report was last modified 12 years and 323 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.