process.kill(process.pid, 'SIGHUP') 报错
发布于 2年前 作者 liaobin 1090 次浏览

process.on('SIGHUP’, function() { console.log(‘接受到 SIGHUP 信号’); });

setTimeout(function() { console.log(‘退出中…’); process.exit(0); }, 100);

process.kill(process.pid, ‘SIGHUP’);

为啥出错啊,也不执行监听 process.on('SIGHUP’, function() { console.log(‘接受到 SIGHUP 信号’); });

报错:

Error: kill ENOSYS at errnoException (node.js:540:13) at process.kill (node.js:728:15) at Object.<anonymous> (E:\liaobin\node.js\second\process\process2.js:10:9) at Module._compile (module.js:456:26) at Object.Module._extensions…js (module.js:474:10) at Object…js (C:\Documents and Settings\Administrator\Application Data\npm node_modules\node-dev\lib\hook.js:52:17) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) [ERROR] 16:21:23 Error

回到顶部