事件:'SIGCONT'
【Event: 'SIGCONT'】
'SIGCONT' 事件会在先前使用 Ctrl+Z (即 SIGTSTP) 将 Node.js 进程移到后台后,再通过 fg(1p) 将其重新带回前台时触发。
如果在 SIGTSTP 请求之前 input 流已被暂停,则不会触发此事件。
【If the input stream was paused before the SIGTSTP request, this event will
not be emitted.】
调用监听器函数时不传入任何参数。
【The listener function is invoked without passing any arguments.】
rl.on('SIGCONT', () => {
// `prompt` will automatically resume the stream
rl.prompt();
}); 'SIGCONT' 事件在 Windows 上不受支持。
【The 'SIGCONT' event is not supported on Windows.】