diff options
author | Bruno Haible <bruno@clisp.org> | 2021-03-22 02:50:07 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2021-03-22 02:50:07 +0100 |
commit | 9ad38b46d9805cad071a4d7aaa370809eb2cee40 (patch) | |
tree | 003204e07d12f5868a38ec66c3c0227e400215b0 /lib/term-style-control.c | |
parent | ea2ccc2e12f8e30f0f7e814b25cd5bc583f7c622 (diff) | |
download | gnulib-9ad38b46d9805cad071a4d7aaa370809eb2cee40.tar.gz |
fatal-signal: Remove dependency upon xalloc.
* lib/fatal-signal.h (at_fatal_signal): Change return type to 'int'.
* lib/fatal-signal.c: Don't include xalloc.h.
(at_fatal_signal): Return an error indicator.
* modules/fatal-signal (Depends-on): Remove xalloc.
* NEWS: Mention the change.
* lib/term-style-control.c: Include xalloc.h.
(ensure_other_signal_handlers): Test return value of at_fatal_signal.
* lib/clean-temp.c (do_init_clean_temp): Likewise.
* lib/wait-process.c (register_slave_subprocess): Likewise.
* modules/term-style-control (Depends-on): Add xalloc-die.
* modules/clean-temp (Depends-on): Likewise.
* modules/wait-process (Depends-on): Likewise.
Diffstat (limited to 'lib/term-style-control.c')
-rw-r--r-- | lib/term-style-control.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/term-style-control.c b/lib/term-style-control.c index 72099a3e95..d2d2133186 100644 --- a/lib/term-style-control.c +++ b/lib/term-style-control.c @@ -46,6 +46,7 @@ #include "sig-handler.h" #include "full-write.h" #include "same-inode.h" +#include "xalloc.h" #define SIZEOF(a) (sizeof(a) / sizeof(a[0])) @@ -813,7 +814,8 @@ ensure_other_signal_handlers (void) if (!signal_handlers_installed) { /* Install the handlers for the fatal signals. */ - at_fatal_signal (fatal_signal_handler); + if (at_fatal_signal (fatal_signal_handler) < 0) + xalloc_die (); #if defined SIGCONT |