Skip to contentSkip to conversation

rpcbind: exit gracefully on termination

PATCH In review Steve Dickson 1 participant 2 messages Oct 24, 2014 – Oct 28, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rpcbind: exit gracefully on termination

When systemd bring rpcbind down, via an expect signal, exit gracefully with a zero status and don't log a meaningless message.

---
 src/rpcbind.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
src/rpcbind.c +1 -3
index 83dbe93..1924d97 100644
@@ -726,11 +726,9 @@ terminate(int dummy /*__unused*/)
 	unlink(_PATH_RPCBINDSOCK);
 	unlink(RPCBINDDLOCK);
 #ifdef WARMSTART
-	syslog(LOG_ERR,
-		"rpcbind terminating on signal. Restart with \"rpcbind -w\"");
 	write_warmstart();	/* Dump yourself */
 #endif
-	exit(2);
+	exit(0); /* exit gracefully */
 }
 
 void
Signature · 1 line
1.9.3
#1 lore raw
Quoted 5 lines · Steve Dickson

When systemd bring rpcbind down, via an expect signal, exit gracefully with a zero status and don't log a meaningless message.

Committed....

steved.

Quoted 22 lines
---
 src/rpcbind.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
src/rpcbind.c +1 -3
index 83dbe93..1924d97 100644
@@ -726,11 +726,9 @@ terminate(int dummy /*__unused*/)
 	unlink(_PATH_RPCBINDSOCK);
 	unlink(RPCBINDDLOCK);
 #ifdef WARMSTART
-	syslog(LOG_ERR,
-		"rpcbind terminating on signal. Restart with \"rpcbind -w\"");
 	write_warmstart();	/* Dump yourself */
 #endif
-	exit(2);
+	exit(0); /* exit gracefully */
 }
 
 void