summaryrefslogtreecommitdiffstats
path: root/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/exec.c b/exec.c
index 7c199a3..e6df2dc 100644
--- a/exec.c
+++ b/exec.c
@@ -390,7 +390,11 @@ fail:
}
} else if (WIFSIGNALED(wstatus)) {
int sig = WTERMSIG(wstatus);
- bfs_warning(execbuf->cmdline, "Command '${ex}%s${rs}' terminated by signal %d\n", execbuf->argv[0], sig);
+ const char *str = strsignal(sig);
+ if (!str) {
+ str = "unknown";
+ }
+ bfs_warning(execbuf->cmdline, "Command '${ex}%s${rs}' terminated by signal %d (%s)\n", execbuf->argv[0], sig, str);
} else {
bfs_warning(execbuf->cmdline, "Command '${ex}%s${rs}' terminated abnormally\n", execbuf->argv[0]);
}