1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

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

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