You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know on windows/linux I can do a targeted kill of the process but this is a bit tedious/hacky.
I was hoping killing the forever-monitor cli would stop the child processes. Other than that, I had hoped I would be able to code in a kill upon exit such as the following:
process.on('exit',function(){child.stop();});
However, not even the above worked. Anybody have an idea how I can kill forever-monitor upon the forever-monitor cli being closed? This allows more ignorant users to easily kill the system while maintaining reliability of running the underlying child script when the CLI is open.
The text was updated successfully, but these errors were encountered:
constpath=require('path');constforever=require('forever-monitor');letchild;functionexit(){console.error('Received exit signal on main process.');if(child)child.stop();process.exit(0);}['SIGINT','SIGKILL','SIGTERM'].forEach(signal=>process.on(signal,exit));child=newforever.Monitor(path.join(__dirname,'server.js'));child.start();
I know on windows/linux I can do a targeted kill of the process but this is a bit tedious/hacky.
I was hoping killing the forever-monitor cli would stop the child processes. Other than that, I had hoped I would be able to code in a kill upon exit such as the following:
However, not even the above worked. Anybody have an idea how I can kill forever-monitor upon the forever-monitor cli being closed? This allows more ignorant users to easily kill the system while maintaining reliability of running the underlying child script when the CLI is open.
The text was updated successfully, but these errors were encountered: