diff mbox

rpcbind: exit gracefully on termination

Message ID 1414156386-16427-1-git-send-email-steved@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Steve Dickson Oct. 24, 2014, 1:13 p.m. UTC
When systemd bring rpcbind down, via an expect signal,
exit gracefully with a zero status and don't log a
meaningless message.

Signed-off-by: Steve Dickson <steved@redhat.com>
---
 src/rpcbind.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Steve Dickson Oct. 28, 2014, 7:06 p.m. UTC | #1
On 10/24/2014 09:13 AM, Steve Dickson wrote:
> When systemd bring rpcbind down, via an expect signal,
> exit gracefully with a zero status and don't log a
> meaningless message.
> 
> Signed-off-by: Steve Dickson <steved@redhat.com>
Committed....

steved.

> ---
>  src/rpcbind.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/src/rpcbind.c b/src/rpcbind.c
> index 83dbe93..1924d97 100644
> --- a/src/rpcbind.c
> +++ b/src/rpcbind.c
> @@ -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
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/src/rpcbind.c b/src/rpcbind.c
index 83dbe93..1924d97 100644
--- a/src/rpcbind.c
+++ b/src/rpcbind.c
@@ -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