gpgscm: Implement 'atexit'.
authorJustus Winter <justus@g10code.com>
Fri, 4 Nov 2016 11:08:20 +0000 (12:08 +0100)
committerJustus Winter <justus@g10code.com>
Fri, 4 Nov 2016 11:42:00 +0000 (12:42 +0100)
commit43f8006f5c75e3d15fe200e2fa41587a73bfb07b
tree13ee63467b52da3a09c1d8c14a9eaae90097b9ab
parentcd00b07ec26c3408e6aee66957b08c6fd319b700
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>
tests/gpgscm/ffi.scm
tests/gpgscm/main.c