summaryrefslogtreecommitdiff
path: root/lib/term-style-control.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2021-03-22 02:50:07 +0100
committerBruno Haible <bruno@clisp.org>2021-03-22 02:50:07 +0100
commit9ad38b46d9805cad071a4d7aaa370809eb2cee40 (patch)
tree003204e07d12f5868a38ec66c3c0227e400215b0 /lib/term-style-control.c
parentea2ccc2e12f8e30f0f7e814b25cd5bc583f7c622 (diff)
downloadgnulib-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.c4
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