[oe-commits] Chen Qi : rpcbind: avoid entering failed status after stopping daemon
git at git.openembedded.org
git at git.openembedded.org
Tue Sep 2 17:11:20 UTC 2014
Module: openembedded-core.git
Branch: master-next
Commit: 4ae80f18a542ef32328b4d1f191b413a20d5c4fb
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=4ae80f18a542ef32328b4d1f191b413a20d5c4fb
Author: Chen Qi <Qi.Chen at windriver.com>
Date: Tue Sep 2 18:54:01 2014 +0800
rpcbind: avoid entering failed status after stopping daemon
Exiting with '2' is actually expected with rpcbind, because it catches
SIGTERM and exits with '2' explicitly.
The related code is as follows.
(void) signal(SIGTERM, terminate);
/*
* Catch the signal and die
*/
static void
terminate(int dummy /*__unused*/)
{
close(rpcbindlockfd);
unlink(_PATH_RPCBINDSOCK);
unlink(RPCBINDDLOCK);
syslog(LOG_ERR,
"rpcbind terminating on signal. Restart with \"rpcbind -w\"");
write_warmstart(); /* Dump yourself */
exit(2);
}
Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/recipes-extended/rpcbind/rpcbind/rpcbind.service | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
index 4de28d4..33ee268 100644
--- a/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
+++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
@@ -9,6 +9,7 @@ Type=forking
EnvironmentFile=- at SYSCONFDIR@/rpcbind.conf
ExecStart=@SBINDIR@/rpcbind -w $RPCBIND_OPTS
Restart=always
+SuccessExitStatus=2
[Install]
WantedBy=multi-user.target
More information about the Openembedded-commits
mailing list