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:
William Hubbs 2017-10-26 12:58:59 -05:00
parent cf429ee359
commit 667a09983c

View File

@ -523,6 +523,7 @@ static void supervisor(char *exec, char **argv)
rc_service_daemon_set(svcname, exec, (const char *const *)argv,
pidfile, false);
rc_service_mark(svcname, RC_SERVICE_STOPPED);
rc_service_value_set(svcname, "child_pid", NULL);
}
exit(EXIT_SUCCESS);
}