From 43f8006f5c75e3d15fe200e2fa41587a73bfb07b Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Fri, 4 Nov 2016 12:08:20 +0100 Subject: gpgscm: Implement 'atexit'. * tests/gpgscm/ffi.scm (throw): Run *run-atexit-handlers* when terminating the interpreter. (*atexit-handlers*): New variable. (*run-atexit-handlers*): New function. (atexit): Likewise. * tests/gpgscm/main.c (main): Run *run-atexit-handlers* at normal interpreter shutdown. Signed-off-by: Justus Winter --- tests/gpgscm/main.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/gpgscm/main.c') diff --git a/tests/gpgscm/main.c b/tests/gpgscm/main.c index f7c6b0d14..70ce85592 100644 --- a/tests/gpgscm/main.c +++ b/tests/gpgscm/main.c @@ -291,6 +291,7 @@ main (int argc, char **argv) log_fatal ("%s: %s", script, gpg_strerror (err)); } + scheme_load_string (sc, "(*run-atexit-handlers*)"); scheme_deinit (sc); xfree (sc); return EXIT_SUCCESS; -- cgit v1.2.3