summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@herrb.eu>2013-05-10 17:26:12 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-05-10 17:26:12 -0700
commitac579e8e3f56f3eadb3426ef97d50f6ab643dc57 (patch)
tree9f6578a9b1f3bf589203ea18d9a37fb452c018b7 /src
parent8dac46accba5ffe67f167bf91f3c48fda77b6f12 (diff)
Use strsignal(3) which is more standard than sig2str()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src')
-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,