From 02eb3348212d50510abe40021bbc9860d47068a3 Mon Sep 17 00:00:00 2001 From: ngie Date: Mon, 22 May 2017 06:04:20 +0000 Subject: [PATCH] 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 git-svn-id: svn://svn.freebsd.org/base/stable/10@318608 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- usr.sbin/rpcbind/rpcbind.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.sbin/rpcbind/rpcbind.c b/usr.sbin/rpcbind/rpcbind.c index a2b5e60e5..e1e3799cb 100644 --- a/usr.sbin/rpcbind/rpcbind.c +++ b/usr.sbin/rpcbind/rpcbind.c @@ -755,12 +755,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); -- 2.45.0