summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1995-02-22 03:17:54 +0000
committerRoland McGrath <roland@redhat.com>1995-02-22 03:17:54 +0000
commitd7a043b46c3875a8feec82820b349165c4e6f1cf (patch)
treed4700b7010d834c255b33e1d8a005322a06e5355
parentd85ab5953a94b1c002ae946e2696e98336303e84 (diff)
downloadgunmake-d7a043b46c3875a8feec82820b349165c4e6f1cf.tar.gz
(child_error): Use strsignal.
-rw-r--r--job.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/job.c b/job.c
index 8640b27..a977fb5 100644
--- a/job.c
+++ b/job.c
@@ -174,14 +174,9 @@ child_error (target_name, exit_code, exit_sig, coredump, ignored)
"*** [%s] Error %d",
target_name, exit_code);
else
- {
- char *coredump_string = coredump ? " (core dumped)" : "";
- if (exit_sig > 0 && exit_sig < NSIG)
- error ("*** [%s] %s%s",
- target_name, sys_siglist[exit_sig], coredump_string);
- else
- error ("*** [%s] Signal %d%s", target_name, exit_sig, coredump_string);
- }
+ error ("*** [%s] %s%s",
+ target_name, strsignal (exit_sig),
+ coredump ? " (core dumped)" : "");
}
static unsigned int dead_children = 0;