supervise-daemon: remove child_pid from saved options during shutdown
This allows us to detect when the supervisor dies unexpectedly because in that case child_pid will still exist.
This commit is contained in:
parent
cf429ee359
commit
667a09983c
@ -523,6 +523,7 @@ static void supervisor(char *exec, char **argv)
|
|||||||
rc_service_daemon_set(svcname, exec, (const char *const *)argv,
|
rc_service_daemon_set(svcname, exec, (const char *const *)argv,
|
||||||
pidfile, false);
|
pidfile, false);
|
||||||
rc_service_mark(svcname, RC_SERVICE_STOPPED);
|
rc_service_mark(svcname, RC_SERVICE_STOPPED);
|
||||||
|
rc_service_value_set(svcname, "child_pid", NULL);
|
||||||
}
|
}
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user