2016-12-08 37 views
0

嗨,我想调用关闭calculator.exe应用程序的事件,但事件本身提高,同时启动应用程序..任何帮助?节点js窗口子进程退出和关闭事件

var filePath="calc.exe"; 
var bat = exec(filePath); 
bat.on('exit', function() { 
alert("exit"); 
}); 

回答

0

尝试用 “SIGINT” 代替 “退出” 而不是:

bat.on('SIGINT', function() { 
alert("exit"); 
}); 
+0

我想这一点,不触发接近事件 –