diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | awk.h | 2 | ||||
-rw-r--r-- | msg.c | 4 |
3 files changed, 9 insertions, 0 deletions
@@ -8,6 +8,9 @@ * eval.c (set_LINT): Call update_ext_api() at the end. * gawkapi.h: Document that do_XXX could change on the fly. + * awk.h (run_ext_exit_handlers): Add declaration. + * msg.c (gawk_exit): Call it. + 2012-06-05 Arnold D. Robbins <arnold@skeeve.com> * ext.c (load_ext): Remove use of RTLD_GLOBAL. Not needed in new @@ -707,10 +707,12 @@ struct break_point; #if 1 #include "gawkapi.h" +/* gawkapi.c: */ extern gawk_api_t api_impl; extern void init_ext_api(void); extern void update_ext_api(void); extern NODE *awk_value_to_node(const awk_value_t *); +extern void run_ext_exit_handlers(int exitval); #endif typedef struct exp_instruction { @@ -158,5 +158,9 @@ gawk_exit(int status) exit_val = status; longjmp(fatal_tag, 1); } + + /* run any extension exit handlers */ + run_ext_exit_handlers(status); + exit(status); } |