事件:'SIGCONT'
\Event: 'SIGCONT'
新增于: v0.7.5
当先前使用 Ctrl+Z(即 SIGTSTP)移至后台的 Node.js 进程随后使用 fg(1p) 返回前台时,会触发 'SIGCONT' 事件。
\The 'SIGCONT' event is emitted when a Node.js process previously moved into
the background using Ctrl+Z (i.e. SIGTSTP) is then
brought back to the foreground using fg(1p).
如果 input 流在 SIGTSTP 请求之前暂停,则不会触发此事件。
\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();
}); Windows 不支持 'SIGCONT' 事件。
\The 'SIGCONT' event is not supported on Windows.