From ae389c83109374fe74b01063061334afb89f2888 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Tue, 7 Dec 2021 14:43:26 +0100 Subject: [PATCH] Fix signal not being used --- src/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index 18f6fa1..6377ebb 100644 --- a/src/main.js +++ b/src/main.js @@ -132,7 +132,7 @@ if(errorMsg){ function shutdown(code, signal = "SIGTERM"){ if(code) exitCode = code; logger.debug("Stopping subprocess tcpdump, then exiting myself.."); - proc.kill(); // Kill process (send SIGTERM), then upper event-handler will stop self + proc.kill(signal); // Kill process, then upper event-handler will stop self } process.on("SIGTERM", shutdownReq); process.on("SIGINT", shutdownReq);