From 5d3857a7171cf5361a088fce3eb213c1d1640578 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Thu, 8 Feb 2024 14:20:17 +0100 Subject: cancel alarm after reaping processes died due to SIGTERM --- nitro.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- cgit 1.4.1