diff options
author | Justus Winter <justus@g10code.com> | 2016-11-04 12:08:20 +0100 |
---|---|---|
committer | Justus Winter <justus@g10code.com> | 2016-11-04 12:42:00 +0100 |
commit | 43f8006f5c75e3d15fe200e2fa41587a73bfb07b (patch) | |
tree | 13ee63467b52da3a09c1d8c14a9eaae90097b9ab /tests/gpgscm/main.c | |
parent | scd: Fix length error for READKEY. (diff) | |
download | gnupg2-43f8006f5c75e3d15fe200e2fa41587a73bfb07b.tar.xz gnupg2-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 <justus@g10code.com>
Diffstat (limited to '')
-rw-r--r-- | tests/gpgscm/main.c | 1 |
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; |