guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trigger action at exit?


From: John Trammell
Subject: Trigger action at exit?
Date: Fri, 29 Feb 2008 16:30:51 -0600

Hi all:

I'm trying to trigger an action at script exit, similar to Perl's "END
{...}" construct.

After a little searching I've stumbled across "add-hook! exit-hook
...", but for the life of me I can't seem to get it to do what I want.
 Here's a taste of what I'm looking for:

   (define foo (lambda () (display "foo") (newline)))
   (add-hook! exit-hook foo)
   (run-hook exit-hook)

I'd like something like this, that doesn't need the explicit
"run-hook" at the end.  Ideas?

Thanks,
JT




reply via email to

[Prev in Thread] Current Thread [Next in Thread]