GNU bug report logs -
#10581
exit-hook is undocumented and is not called from a non-interactive environment
Previous Next
Full log
View this message in rfc822 format
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.
> 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.
Andy
--
http://wingolog.org/
This bug report was last modified 12 years and 324 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.