我希望在另一个进程退出后运行一个进程。
例如,如果我正在运行一个node JS文件并按下CTRL+C,它应该关闭当前文件并从另一个JS文件中运行另一个进程。
类似这样的伪代码:
例如,如果我正在运行一个node JS文件并按下CTRL+C,它应该关闭当前文件并从另一个JS文件中运行另一个进程。
类似这样的伪代码:
process.on('exit', () => {
console.log("exiting")
}).then( //I am conscious it's wrong to put like that
//open another js file and run this process
);