3 ms·
Another thing is that SIGINT interruption (via Ctrl-C or whatever character is configured) and SIGHUP signals wouldn't be reliable if faked outside of the kern
by kazinator 12y ago
Another thing is that SIGINT interruption (via Ctrl-C or whatever character is configured) and SIGHUP signals
wouldn't be reliable if faked outside of the kernel.
Firstly, the tty driver can read and respond to a Ctrl-C even if the application is single-threaded and spinning in a loop, or blocked on some device other than the TTY. If Ctrl-C were handled in user space, then there would have to be a thread through which the terminal I/O goes. Secondly, that thread would have to be completely reliable, and never block or hang for any reason other than reading from the TTY.
Also, a security feature known as a SAK (secure attention key) needs to be in the kernel. A TTY which implements a SAK cannot be entirely transparent.