SIGINT Avoidance
nodechanges the value CTRL-Cby disabling the interruptVINTR character (usually CTRL-C) to avoid the interrupt signal that it might receive.
After you start rlwrapgoing to sleep all the time, until something happens to your terminal or pseudo ( ptys) used, for example node. This "something" can be a keystroke or displayed with node.
Each time this happens, it rlwrapwill copy the terminal settings nodes(including VINTR)) to its own tty.
, node , rlwrap, , , . : CTRL-C rlwrap, SIGINT, node .break.
, pty (EXTPROC), pty (rlwrap) , . , 0.41, rlwrap --polling, 40 .
CTRL-C
0.43, rlwrap , readline
rlwrap-direct-keypress ~/.inputrc:
$if node
"\C-c": rlwrap-direct-keypress
$endif
node CTRL+C, readline ( NODE_NO_READLINE=1 node, CTRL-C), , )
(.. ), rlwrap :
$ rlwrap --always-readline node
, ,
keypresses (Continue? Y/N)
extra Enter.
, : , node CTRL-C ( SIGINT)
. :
stty intr undef
rlwrap --always-readline node
stty intr '^c'
rlwrap --polling --always-readline node
:
"\C-c": rlwrap-direct-keypress inputcrlwrap --polling --always-readline,- Enter