http://qs321.pair.com?node_id=1214741


in reply to signal handler output

Is this the shell, the terminal or what?

It's the shell controlling the terminal. Here's what happens in bash if I interrupt both these commands:

$ sleep 30 ^C $ stty -ctlecho; sleep 30 $

As for perl, I expect IO::Stty might be able to do it but I've never used it for that.

Replies are listed 'Best First'.
Re^2: signal handler output
by Anonymous Monk on May 17, 2018 at 14:50 UTC

    Not the shell, it's the tty driver itself. For linux, that would be n_tty_receive_char() in drivers/tty/n_tty.c. Upon receiving the control char, it optionally echoes it.