mirror of
https://github.com/troglobit/finit.git
synced 2026-11-23 20:11:44 +00:00
service: keep a stop of a forking service waiting for its PID file
Stopping a forking service after its start script had exited, but
before the daemon had written its PID file, did not hold. When the
PID file showed up, the service was reported running again and the
daemon was left alone:
initctl stop ext
service_forked() cleared any block on the service, the user's stop
included.
Keep a user stop, and let the state machine stop the late daemon of
a service no longer enabled. The service is briefly RUNNING on its
way to STOPPING, so service/NAME/running blinks on and off.
Follow-up to #452
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
5 files changed
+47
-9
No files matched your search
+1
-1
@@ -58,7 +58,7 @@ int service_timeout_after (svc_t *svc, int timeout, void (*cb)(svc_t *svc
|
||||
int service_timeout_cancel (svc_t *svc);
|
||||
void compose_cmdline (svc_t *svc, char *buf, size_t len);
|
||||
|
||||
void service_forked (svc_t *svc);
|
||||
int service_forked (svc_t *svc);
|
||||
void service_ready (svc_t *svc, int ready);
|
||||
|
||||
int service_stop (svc_t *svc);
|
||||
|
||||
Reference in new issue
Block a user