mirror of
https://github.com/troglobit/finit.git
synced 2026-10-29 12:40:44 +00:00
service: give stop and reload scripts their own timeout
Both were bounded by killdelay, the delay between the stop signal and SIGKILL, because service_run_script() had nothing else to reach for. That conflates two things: how long the daemon may take to die, and how long its stop script may run. Give each hook a timeout of its own, defaulting to killdelay when unset, so the existing behaviour is what you get until you ask for something else. parse_script() already falls back that way for the hooks that had one. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
2 files changed
+8
-6
No files matched your search
@@ -221,9 +221,11 @@ typedef struct svc {
|
||||
|
||||
/* When set, used instead of SIGHUP or stop-start */
|
||||
char reload_script[MAX_CMD_LEN];
|
||||
int reload_tmo;
|
||||
|
||||
/* When set, used instead of SIGTERM or sysv 'stop' */
|
||||
char stop_script[MAX_CMD_LEN];
|
||||
int stop_tmo;
|
||||
|
||||
/*
|
||||
* Used to forcefully kill services that won't shutdown on
|
||||
|
||||
Reference in new issue
Block a user