diff options
| author | Jakob Kaivo <jkk@ung.org> | 2024-01-30 14:57:46 -0500 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2024-01-30 14:57:46 -0500 |
| commit | cc6e7378d3f5473137e0c46d39173e6f60dcefda (patch) | |
| tree | 4cd2883ad16fd594b7777b6f3821d5b9177af5c4 /src/stdlib/at_quick_exit.c | |
| parent | 000a7c045c98c30aac86db93f8c9c978e5ca8c59 (diff) | |
update standards and safety checks
Diffstat (limited to 'src/stdlib/at_quick_exit.c')
| -rw-r--r-- | src/stdlib/at_quick_exit.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/stdlib/at_quick_exit.c b/src/stdlib/at_quick_exit.c index f3659fd6..e3ae86cc 100644 --- a/src/stdlib/at_quick_exit.c +++ b/src/stdlib/at_quick_exit.c @@ -1,5 +1,3 @@ -#if 0 - #include <stdlib.h> #include <limits.h> #include <errno.h> @@ -8,11 +6,11 @@ /** register a function to run at quick exit **/ int at_quick_exit(void (*func)(void)) { - __C_MIN(201112L); - if (__stdlib.nat_quick_exit >= ATEXIT_MAX) { - return 1; - } + SIGNAL_SAFE(0); + (void)func; + + /* if (__stdlib.at_quick_exit == NULL) { __stdlib.at_quick_exit = calloc(1, sizeof(*__stdlib.at_quick_exit)); @@ -35,6 +33,7 @@ int at_quick_exit(void (*func)(void)) __stdlib.at_quick_exit->next->prev = __stdlib.at_quick_exit; __stdlib.at_quick_exit = __stdlib.at_quick_exit->next; __stdlib.nat_quick_exit++; + */ return 0; } @@ -54,6 +53,3 @@ program exits via fn(quick_exit). The function must take no parameters. /* STDC(201112) */ - - -#endif |
