[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#10581: exit-hook is undocumented and is not called from a non-intera
From: |
Andy Wingo |
Subject: |
bug#10581: exit-hook is undocumented and is not called from a non-interactive environment |
Date: |
Sun, 05 Feb 2012 12:50:39 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) |
Hi Andrew,
On Sun 22 Jan 2012 20:58, Andrew Psaltis <address@hidden> 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/
- bug#10581: exit-hook is undocumented and is not called from a non-interactive environment,
Andy Wingo <=