I want to see how the terminal polls stdin read()s when noncanonical, when VMIN is not 0, and when VTIME is not 0. My assumption is that all of these settings regardless require the program to constantly check if there is something new in queue. I want to see this part of the code.
I tried to look at termios.h, termios/tcsetattr.c, but couldn’t find anything because I couldn’t follow libc_hidden_def (tcsetattr)
.
Then I figured it was probably the task of the terminal to implement the termios struct settings, so I downloaded the xfce4 terminal source code, but couldn’t find anything. Now I’m suspecting it’s the terminal thing in the backgroudn to which the terminal programs are just a frontend. I can’t find what that is.
There is also the question how can I call read(2), and the terminal knows immediately that I want a specific file, and keeps track of its timeouts.
Point me in the right direction.