From 8e5c6db8f4f4fb1fe8cf5b3b58fd4732e4b07544 Mon Sep 17 00:00:00 2001 From: G S Marzot Date: Thu, 20 Jul 2023 07:21:51 -0400 Subject: [PATCH] stop process using configured signal --- utility/daemon/daemon.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utility/daemon/daemon.js b/utility/daemon/daemon.js index 74b0fdb5..f88852e4 100644 --- a/utility/daemon/daemon.js +++ b/utility/daemon/daemon.js @@ -36,7 +36,7 @@ module.exports = function(RED) { if (msg.hasOwnProperty("stop")) { this.stopped = true; if (node.running) { - node.child.kill("SIGINT"); + node.child.kill(node.closer); } node.debug(node.cmd+" stopped by msg"); node.status({fill:"grey",shape:"ring",text:RED._("daemon.status.stopped")}); @@ -54,7 +54,8 @@ module.exports = function(RED) { } runit(args); } else { - node.child.kill("SIGINT"); + node.child.kill(node.closer); + // should this also re-start the process incase redo is not set XXX } } else {