'SIGCONT' 事件
如果 input
流在 SIGTSTP
请求之前暂停,则不会触发此事件。
调用监听器函数时不传入任何参数。
rl.on('SIGCONT', () => {
// `prompt` 会自动恢复流
rl.prompt();
});
Windows 不支持 '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)
.
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();
});
The 'SIGCONT'
event is not supported on Windows.