|
|
|
|
|
by rgoulter
2290 days ago
|
|
I liked this explanation. https://www.linusakesson.net/programming/tty/ When the TTY device takes (by default) Ctrl+C or Ctrl+D, it sends the signals to the program.
The TTY's 'line discipline' (the policy for when the program's STDIN can read from a line of input) can be changed from a default 'cooked' to a 'raw mode'. In with raw mode line discipline the Ctrl+C doesn't send the signal. Presumably that's why e.g. vi or emacs don't just close on Ctrl+C. |
|
This helps me, thanks for pointing me back at this great write-up.