diff options
author | Leah Neukirchen <leah@vuxu.org> | 2023-12-25 18:35:45 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2023-12-25 18:35:45 +0100 |
commit | c98535fc808f4e1e22ec57b9286cc1aafc0206f2 (patch) | |
tree | bd3d80b7c162c0a4ca0065a3166f3906cd6b0c12 /nitro.c | |
parent | 40a47897b371cd669e24136a290a2eb2caccb191 (diff) | |
download | nitro-c98535fc808f4e1e22ec57b9286cc1aafc0206f2.tar.gz nitro-c98535fc808f4e1e22ec57b9286cc1aafc0206f2.tar.xz nitro-c98535fc808f4e1e22ec57b9286cc1aafc0206f2.zip |
add a 7s timeout for the finish script
Diffstat (limited to 'nitro.c')
-rw-r--r-- | nitro.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nitro.c b/nitro.c index d0895f7..eeaa308 100644 --- a/nitro.c +++ b/nitro.c @@ -313,6 +313,8 @@ proc_finish(int i) } services[i].finishpid = child; + services[i].timeout = 7000; + services[i].deadline = 0; } void @@ -348,6 +350,9 @@ proc_kill(int i) if (services[i].pid) kill(services[i].pid, SIGKILL); + if (services[i].finishpid) + kill(services[i].finishpid, SIGKILL); + assert(services[i].state == PROC_SHUTDOWN || services[i].state == PROC_RESTART); } |