aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gpgscm/main.c
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2016-11-04 11:08:20 +0000
committerJustus Winter <[email protected]>2016-11-04 11:42:00 +0000
commit43f8006f5c75e3d15fe200e2fa41587a73bfb07b (patch)
tree13ee63467b52da3a09c1d8c14a9eaae90097b9ab /tests/gpgscm/main.c
parentscd: Fix length error for READKEY. (diff)
downloadgnupg-43f8006f5c75e3d15fe200e2fa41587a73bfb07b.tar.gz
gnupg-43f8006f5c75e3d15fe200e2fa41587a73bfb07b.zip
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 <[email protected]>
Diffstat (limited to 'tests/gpgscm/main.c')
-rw-r--r--tests/gpgscm/main.c1
1 files changed, 1 insertions, 0 deletions
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;