linux - How to run an independent bash script in nodejs -
so run script kills nodejs process , runs 1 in screen window. when run command console works, when run nodejs script kill
part gets executed server never run.
filelog('attempting restartnodejs pid: ' + pid + ' serverjslocation: ' + serverjslocation); filelog('kill ' + pid + ';screen -d -m -l nodejs ' + serverjslocation); //return; exec('kill ' + pid + ';screen -d -m -l nodejs ' + serverjslocation);
and log
attempting restartnodejs pid: 29685 serverjslocation: /home/git/gitorade/server.js kill 29685;screen -d -m -l nodejs /home/git/gitorade/server.js
but server not run. ps -e | grep nodejs
returns nothing while @ first run output process.
my guess it's run fork somehow when kill nodejs screen command never gets executed because can in no way response or log out of action. screen.0 log empty after command.
how run exec independently not killed after kill
?
Comments
Post a Comment