From 8a3c85c8028efe135c2eef7c5db204ae30c60ba2 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 18 May 2016 06:37:37 -0700 Subject: 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. --- sysif.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sysif.h') 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 -- cgit v1.2.3