diff options
author | Leah Neukirchen <leah@vuxu.org> | 2024-02-08 14:20:17 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2024-02-08 14:20:17 +0100 |
commit | 5d3857a7171cf5361a088fce3eb213c1d1640578 (patch) | |
tree | 8a736497a6d3b086de0cd81fd52d8c82efe427df | |
parent | d6e27ae923575f0aa59875af6a4f2e7d7b0bb93c (diff) | |
download | nitro-5d3857a7171cf5361a088fce3eb213c1d1640578.tar.gz nitro-5d3857a7171cf5361a088fce3eb213c1d1640578.tar.xz nitro-5d3857a7171cf5361a088fce3eb213c1d1640578.zip |
cancel alarm after reaping processes died due to SIGTERM
-rw-r--r-- | nitro.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nitro.c b/nitro.c index 3c48a44..3f30507 100644 --- a/nitro.c +++ b/nitro.c @@ -1547,13 +1547,14 @@ main(int argc, char *argv[]) .sa_mask = allset, }; sigaction(SIGALRM, &sa, 0); - alarm(3); + alarm(3); while (1) { int r = waitpid(-1, 0, 0); if (r < 0) break; } + alarm(0); prn(2, "- nitro: sending SIGKILL to all processes\n"); kill(-1, SIGKILL); |