Added error-handling for process

f_gracefulShutdown
Ruakij 3 years ago
parent 0709db0ddf
commit 5a0118aedd

@ -75,6 +75,10 @@ if(errorMsg){
loggerTcpdump.error(data); loggerTcpdump.error(data);
}); });
proc.on("error", (err) => {
loggerTcpdump.error(err);
});
logger.debug("Attaching exit-handler.."); logger.debug("Attaching exit-handler..");
proc.on("exit", (code) => { proc.on("exit", (code) => {
loggerTcpdump.debug(`tcpdump exited code: ${code}`); loggerTcpdump.debug(`tcpdump exited code: ${code}`);

Loading…
Cancel
Save