'pause' 事件


发生以下情况之一时会触发 'pause' 事件:

  • input 流已暂停。
  • input 流没有暂停并接收 'SIGCONT' 事件。 (参见事件 'SIGTSTP''SIGCONT'。)

调用监听器函数时不传入任何参数。

rl.on('pause', () => {
  console.log('Readline paused.');
});

The 'pause' event is emitted when one of the following occur:

  • The input stream is paused.
  • The input stream is not paused and receives the 'SIGCONT' event. (See events 'SIGTSTP' and 'SIGCONT'.)

The listener function is called without passing any arguments.

rl.on('pause', () => {
  console.log('Readline paused.');
});