summaryrefslogtreecommitdiff
path: root/lib/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/process.c')
-rw-r--r--lib/process.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/process.c b/lib/process.c
index 9fe742c0e..0aa18422d 100644
--- a/lib/process.c
+++ b/lib/process.c
@@ -348,9 +348,15 @@ process_status_msg(int status)
if (WIFEXITED(status)) {
ds_put_format(&ds, "exit status %d", WEXITSTATUS(status));
} else if (WIFSIGNALED(status)) {
- ds_put_format(&ds, "killed (%s)", signal_name(WTERMSIG(status)));
+ char namebuf[SIGNAL_NAME_BUFSIZE];
+
+ ds_put_format(&ds, "killed (%s)",
+ signal_name(WTERMSIG(status), namebuf, sizeof namebuf));
} else if (WIFSTOPPED(status)) {
- ds_put_format(&ds, "stopped (%s)", signal_name(WSTOPSIG(status)));
+ char namebuf[SIGNAL_NAME_BUFSIZE];
+
+ ds_put_format(&ds, "stopped (%s)",
+ signal_name(WSTOPSIG(status), namebuf, sizeof namebuf));
} else {
ds_put_format(&ds, "terminated abnormally (%x)", status);
}