summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;