summaryrefslogtreecommitdiff
path: root/lib/wait-process.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/wait-process.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/wait-process.c')
-rw-r--r--lib/wait-process.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/wait-process.c b/lib/wait-process.c
index 88a1eaa15a..bbf5de2a05 100644
--- a/lib/wait-process.c
+++ b/lib/wait-process.c
@@ -121,7 +121,8 @@ register_slave_subprocess (pid_t child)
if (!cleanup_slaves_registered)
{
atexit (cleanup_slaves);
- at_fatal_signal (cleanup_slaves_action);
+ if (at_fatal_signal (cleanup_slaves_action) < 0)
+ xalloc_die ();
cleanup_slaves_registered = true;
}