Following on from a recent post it seems that the Exec node Timeout feature does not work when configured for exec mode, though it does work for spawn mode. See the attached example flow. The exec node runs a 20 second sleep and the timeout is set to 10 seconds, so the node should terminate after 10 seconds. In fact it does not terminate until the 20 seconds has elapsed, though at that point it does indicate a SIGTERM error. Looking at ps
it seems that the exec node starts a shell which runs the sleep command and the timeout does kill the shell, but not the spawned sleep process.
If the Exec node is switched to spawn mode then it terminates correctly after 10 seconds.
This is not limited to the sleep command, I also see it running other software.
I am running node-red 1.0.6 with nodejs 12.18.0 on Ubuntu 19.10.
[{"id":"30e1839a.cade6c","type":"exec","z":"8c99ec05.74e658","command":"sleep 20","addpay":false,"append":"","useSpawn":"false","timer":"10","oldrc":false,"name":"","x":420,"y":423,"wires":[["dccd5011.4926e"],["64252707.f9e7"],["a9768a27.692d6"]]},{"id":"127167a5.30506","type":"inject","z":"8c99ec05.74e658","name":"Go","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":124,"y":389,"wires":[["30e1839a.cade6c","7d39cdd0.42cc64"]]},{"id":"dccd5011.4926e","type":"debug","z":"8c99ec05.74e658","name":"OP/1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":590,"y":383,"wires":[]},{"id":"64252707.f9e7","type":"debug","z":"8c99ec05.74e658","name":"OP/2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":588,"y":425,"wires":[]},{"id":"a9768a27.692d6","type":"debug","z":"8c99ec05.74e658","name":"OP/3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":588,"y":465,"wires":[]},{"id":"7d39cdd0.42cc64","type":"debug","z":"8c99ec05.74e658","name":"START","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":601,"y":334,"wires":[]}]