1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

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>
This commit is contained in:
Justus Winter 2016-11-04 12:08:20 +01:00
parent cd00b07ec2
commit 43f8006f5c
2 changed files with 19 additions and 0 deletions

View file

@ -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;