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);