summaryrefslogtreecommitdiff
path: root/src/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/server.c')
-rw-r--r--src/server.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server.c b/src/server.c
index e73eb08..cc853bf 100644
--- a/src/server.c
+++ b/src/server.c
@@ -755,10 +755,11 @@ XhivWaitServer(pid_t server_pid) {
return exitstat;
} else if (WIFSIGNALED(pidstat)) {
int sig = WTERMSIG(pidstat);
- char signame[SIG2STR_MAX];
+ const char *signame;
- if (sig2str(sig, signame) == -1)
- snprintf(signame, sizeof(signame), "unknown");
+ signame = strsignal(sig);
+ if (signame == NULL)
+ signame = "unknown";
fprintf(stderr, "Server %ld killed by signal %d (%s)%s.\n",
(long) server_pid, sig, signame,