summaryrefslogtreecommitdiffstats
path: root/sysif.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-05-18 06:37:37 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-05-18 06:37:37 -0700
commit8a3c85c8028efe135c2eef7c5db204ae30c60ba2 (patch)
tree4223d626529937701574c828541a1d808dc9d311 /sysif.h
parent97fce155c0b92429b9deabfca31e35dbb5fe0d8f (diff)
downloadtxr-8a3c85c8028efe135c2eef7c5db204ae30c60ba2.tar.gz
txr-8a3c85c8028efe135c2eef7c5db204ae30c60ba2.tar.bz2
txr-8a3c85c8028efe135c2eef7c5db204ae30c60ba2.zip
New functions: at-exit-call and at-exit-do-not-call.
* sysif.c (at_exit_list): New static variable. (at_exit_call, at_exit_do_not_call): New functions. (at_exit_handler): New static function. (sysif_init): GC-protect at_exit_list. Register at_exit_handler with C atexit function. Register intrinsic functions at-exit-call and at-exit-do-not-call. * sysif.h (at_exit_call, at_exit_do_not_call): Registered. * txr.1: Documented.
Diffstat (limited to 'sysif.h')
-rw-r--r--sysif.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysif.h b/sysif.h
index 62712387..5b22ea5c 100644
--- a/sysif.h
+++ b/sysif.h
@@ -43,6 +43,8 @@ typedef long off_t;
#endif
val getenv_wrap(val name);
+val at_exit_call(val func);
+val at_exit_do_not_call(val func);
#if HAVE_FORK_STUFF
val exec_wrap(val file, val args_opt);
#endif