From: Kevin Ryde <user42@zip.com.au>
Cc: guile-user@gnu.org
Subject: Re: atexit function
Date: Sat, 16 Sep 2006 10:32:26 +1000 [thread overview]
Message-ID: <87irjowt0l.fsf@zip.com.au> (raw)
In-Reply-To: <J5N0D1$EEBE2E26B077A1F877E2DC3B7AB8D9C6@poste.it> (Marco Maggi's message of "Fri, 15 Sep 2006 16:03:01 +0200")
"Marco Maggi" <marco.maggi-ipsu@poste.it> writes:
>
> Is it possible to have an ATEXIT function? That is:
> an interface to register thunks that are executed
> when the script exits.
I've been using this:
(define-public (c-atexit proc)
(let ((old-exit exit))
(set! exit (lambda args
(proc)
(apply old-exit args)))))
to hang code on the exit func. Unfortunately the normal "guile -s" to
run a script doesn't go via that function, so it only works if you
explicitly "(exit 0)".
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
next prev parent reply other threads:[~2006-09-16 0:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-15 14:03 atexit function Marco Maggi
2006-09-16 0:32 ` Kevin Ryde [this message]
2006-09-18 0:44 ` Jon Wilson
-- strict thread matches above, loose matches on Subject: below --
2006-09-18 6:46 Marco Maggi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87irjowt0l.fsf@zip.com.au \
--to=user42@zip.com.au \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).