supervise-daemon: mark the service started when the supervisor is active
This commit is contained in:
parent
6ac094a59c
commit
5de3798afc
@ -694,6 +694,10 @@ int main(int argc, char **argv)
|
|||||||
fprintf(fp, "%d\n", getpid());
|
fprintf(fp, "%d\n", getpid());
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
|
if (svcname)
|
||||||
|
rc_service_daemon_set(svcname, exec,
|
||||||
|
(const char * const *) argv, pidfile, true);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Supervisor main loop
|
* Supervisor main loop
|
||||||
*/
|
*/
|
||||||
@ -718,10 +722,6 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (svcname)
|
|
||||||
rc_service_daemon_set(svcname, exec,
|
|
||||||
(const char * const *) argv, pidfile, true);
|
|
||||||
|
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
} else if (child_pid == 0)
|
} else if (child_pid == 0)
|
||||||
child_process(exec, argv);
|
child_process(exec, argv);
|
||||||
|
Loading…
Reference in New Issue
Block a user