From e0d5784d0ed9ffc9276fa35b2e1dc87e884af2f2 Mon Sep 17 00:00:00 2001 From: jkh Date: Sat, 9 Oct 1993 00:48:26 +0000 Subject: Handle both signals and errors in child processes, rather than just signals as before. --- gnu/usr.bin/man/lib/util.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gnu/usr.bin/man') diff --git a/gnu/usr.bin/man/lib/util.c b/gnu/usr.bin/man/lib/util.c index f462e3e..e8253a8 100644 --- a/gnu/usr.bin/man/lib/util.c +++ b/gnu/usr.bin/man/lib/util.c @@ -19,6 +19,7 @@ #include #include #include +#include #ifdef STDC_HEADERS #include @@ -137,8 +138,12 @@ do_system_command (command) else status = system (command); - if (status) + if (WIFSIGNALED(status)) return 0; + else if (WEXITSTATUS(status)) { + gripe_system_command (status); + return 0; + } else return 1; } -- cgit v1.1