I'm writing a node.js application deployed through linkedin's glu platform.
The command to launch calls sudo -u <user> node app.js
to start the node app as the right user, basically storing this command as a string and calling Groovy's exec()
command on it.
The node app makes use of cluster to fork based of the number processors available, but basically it main job is to get some info and then launch a shell script via exec()
.
Sometimes the shell script will error out which is ok, but the problem is that when running under glu sometimes these shell scripts will become defunct on error, but should i start the node process through the terminal using sudo -u <user> node app.js
, the process launches fine and the shell process get cleaned up properly.
What could cause the difference in behavior?