diff mbox

[LEDE-DEV] remove pidfile when daemon dies and is not respawned

Message ID CALxZQ2MAWBAA9SgNT1AdZUq15oPuCLfN45+kH-MQYzTa2GNSzQ@mail.gmail.com
State Superseded
Headers show

Commit Message

Jurgen Van Ham July 5, 2016, 6:13 a.m. UTC
When a daemon dies unexpectedly and it will not be respawned, the
pidfile needs to be removed. (halt is set as !respawn)
diff mbox

Patch

--- a/service/instance.c        2016-07-01 14:22:53.507113056 +0200
+++ b/service/instance.c        2016-07-01 14:24:38.541075073 +0200
@@ -513,7 +513,7 @@ 

        uloop_timeout_cancel(&in->timeout);
        if (in->halt) {
-               /* no action */
+               instance_removepid(in);
        } else if (in->restart) {
                instance_start(in);
        } else if (in->respawn) {