From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs 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 Message-ID: <87r4y9h52o.fsf@pobox.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1328442692 32397 80.91.229.3 (5 Feb 2012 11:51:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 5 Feb 2012 11:51:32 +0000 (UTC) Cc: 10581@debbugs.gnu.org To: Andrew Psaltis Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sun Feb 05 12:51:28 2012 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ru0ct-0002Tg-S9 for guile-bugs@m.gmane.org; Sun, 05 Feb 2012 12:51:24 +0100 Original-Received: from localhost ([::1]:40686 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ru0ct-00017I-6H for guile-bugs@m.gmane.org; Sun, 05 Feb 2012 06:51:23 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:46648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ru0cq-00016y-8Z for bug-guile@gnu.org; Sun, 05 Feb 2012 06:51:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ru0cp-00073F-6I for bug-guile@gnu.org; Sun, 05 Feb 2012 06:51:20 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51387) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ru0cp-00073B-1x for bug-guile@gnu.org; Sun, 05 Feb 2012 06:51:19 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Ru0dW-0007El-58 for bug-guile@gnu.org; Sun, 05 Feb 2012 06:52:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andy Wingo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 05 Feb 2012 11:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10581 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 10581-submit@debbugs.gnu.org id=B10581.132844269427786 (code B ref 10581); Sun, 05 Feb 2012 11:52:02 +0000 Original-Received: (at 10581) by debbugs.gnu.org; 5 Feb 2012 11:51:34 +0000 Original-Received: from localhost ([127.0.0.1]:55010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ru0d1-0007E1-C7 for submit@debbugs.gnu.org; Sun, 05 Feb 2012 06:51:33 -0500 Original-Received: from a-pb-sasl-sd.pobox.com ([74.115.168.62]:57372 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ru0cx-0007Ds-89 for 10581@debbugs.gnu.org; Sun, 05 Feb 2012 06:51:29 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id CE0FD837B; Sun, 5 Feb 2012 06:50:42 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=fibRm16d5dzdHpFiBNRYkOgYQlQ=; b=RXLqA1 2nObKreuqQXWtXDyFmWqHzeS+R9oQB+ikd2t5tEt2U9ZKXB1z+ewIScEEXaVwj9+ gVjxqOZg8ogUWqVOAuOcsL2aEQYFmfF6Wilvu3JKSCuQh1PNTWHN5a0pTMrme4cZ Pf/S5Vw5TBiPK2wrrEi+SgRfJP37kigsrR64g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=PninRlIAKoxicf9QDxhZ4FMjixvD+kTY 9lf+A9EUkLm/1uwtB0n4ua6Gil7NUhXJm6RnXf09bgIzCDydkf8xVvK0cnc8QJrq DL4RgojawI5XVZrA5HNotkzH9hYDVRJpcNqOdBptZQwyh+KrWyX4gsFkNTuZ67G8 tY09CCEfYug= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id BF53E837A; Sun, 5 Feb 2012 06:50:42 -0500 (EST) Original-Received: from badger (unknown [193.191.37.127]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 487368379; Sun, 5 Feb 2012 06:50:42 -0500 (EST) In-Reply-To: (Andrew Psaltis's message of "Sun, 22 Jan 2012 14:58:51 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-Pobox-Relay-ID: A18B7112-4FEF-11E1-9385-65B1DE995924-02397024!a-pb-sasl-sd.pobox.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:6202 Archived-At: Hi Andrew, On Sun 22 Jan 2012 20:58, Andrew Psaltis 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/