(no title)
thiagocsf | 4 years ago
Said EOF is honoured by your TTY, which closes the FD this ending the session.
You can see this by typing `cat -` and ending it with ctrl+d. The windows equivalent is ctrl+z.
thiagocsf | 4 years ago
Said EOF is honoured by your TTY, which closes the FD this ending the session.
You can see this by typing `cat -` and ending it with ctrl+d. The windows equivalent is ctrl+z.
gnubison|4 years ago
If there’s nothing in the line-buffer (because you pressed VEOF at the start of the line) then read(2) returns 0, which is interpreted as an end-of-file condition by your libc in fread() and friends.
You can checkout OpenBSD’s termios(4) for a more detailed explanation :)