[LEDE-DEV] [PATCH] procd: remove pidfile after unexpected termination without respawn

Jurgen Van Ham juvanham.tc at gmail.com
Tue Jul 5 00:57:18 PDT 2016


When procd detects a daemon halts and it is not configured to
be respawned, the pidfile has to be removed.


Signed-off-by: Jurgen Van Ham <juvanham.tc at gmail.com>
---
 service/instance.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/service/instance.c b/service/instance.c
index dccf4b4..d7d1f82 100644
--- a/service/instance.c
+++ b/service/instance.c
@@ -513,7 +513,7 @@ instance_exit(struct uloop_process *p, int ret)
 
 	uloop_timeout_cancel(&in->timeout);
 	if (in->halt) {
-		/* no action */
+		instance_removepid(in);
 	} else if (in->restart) {
 		instance_start(in);
 	} else if (in->respawn) {
-- 
1.7.9.5




More information about the Lede-dev mailing list