Make exec node explicitly call SIGTERM for default

This commit is contained in:
Dave Conway-Jones 2017-06-05 09:47:42 +01:00
parent 90ab34591a
commit ef90f19eaa
No known key found for this signature in database
GPG Key ID: 81B04231572A9A2D
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ module.exports = function(RED) {
this.on("input", function(msg) {
if (msg.hasOwnProperty("kill")) {
if (typeof msg.kill !== "string" || msg.kill.length === 0 || !msg.kill.toUpperCase().startsWith("SIG") ) { msg.kill = ""; }
if (typeof msg.kill !== "string" || msg.kill.length === 0 || !msg.kill.toUpperCase().startsWith("SIG") ) { msg.kill = "SIGTERM"; }
if (msg.hasOwnProperty("pid")) {
if (node.activeProcesses.hasOwnProperty(msg.pid) ) {
node.activeProcesses[msg.pid].kill(msg.kill.toUpperCase());