summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2017-05-22 06:03:51 +0000
committerngie <ngie@FreeBSD.org>2017-05-22 06:03:51 +0000
commit387fc2abeeff61636008fb690c45b518a9f41389 (patch)
tree71d78593d689b0ddc76e2e9c5ff290494753d71c /usr.sbin
parent2d2efa93a5fb572a6a6aeca163c8b63b740c1f45 (diff)
downloadFreeBSD-src-387fc2abeeff61636008fb690c45b518a9f41389.zip
FreeBSD-src-387fc2abeeff61636008fb690c45b518a9f41389.tar.gz
MFC r317154:
Print out the signal number on exit in terminate(..) if WARMSTART is compiled into rpcbind. The signal number can provide helpful diagnostic info. Obtained from: Isilon OneFS
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/rpcbind/rpcbind.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/rpcbind/rpcbind.c b/usr.sbin/rpcbind/rpcbind.c
index b248bd3..9d5a608b 100644
--- a/usr.sbin/rpcbind/rpcbind.c
+++ b/usr.sbin/rpcbind/rpcbind.c
@@ -757,12 +757,13 @@ rbllist_add(rpcprog_t prog, rpcvers_t vers, struct netconfig *nconf,
* Catch the signal and die
*/
static void
-terminate(int dummy __unused)
+terminate(int signum __unused)
{
close(rpcbindlockfd);
#ifdef WARMSTART
syslog(LOG_ERR,
- "rpcbind terminating on signal. Restart with \"rpcbind -w\"");
+ "rpcbind terminating on signal %d. Restart with \"rpcbind -w\"",
+ signum);
write_warmstart(); /* Dump yourself */
#endif
exit(2);
OpenPOWER on IntegriCloud