Event: 'SIGTSTP'
function () {}
This does not work on Windows.
Emitted whenever the input
stream receives a ^Z
, respectively known as SIGTSTP
. If there is no SIGTSTP
event listener present when the input
stream receives a SIGTSTP
, the program will be sent to the background.
When the program is resumed with fg
, the 'pause'
and SIGCONT
events will be emitted. You can use either to resume the stream.
The 'pause'
and SIGCONT
events will not be triggered if the stream was paused before the program was sent to the background.
Example of listening for SIGTSTP
:
rl.on('SIGTSTP', () => { // This will override SIGTSTP and prevent the program from going to the // background. console.log('Caught SIGTSTP.'); });
Please login to continue.