News for hackers. Stuff that matters.
Re:Getting the ^D by jwilk on Monday April 10, 2023 @03:15AM (#35509925)
> the process has to be programmed to stop if read returns no bytes. A process could carry on regardless, or not read stdin at all. In Bash, if you type half a command and press ^D repeatedly, nothing happens.

It's not a good example, because bash disables the canonical mode. When you type ^D this happens:

  read(0, "\4", 1)                        = 1
(And then bash ignores the read EOT character.)
Re:Getting the ^D by rhooke on Monday April 10, 2023 @06:29AM (#35510825)
Author here. You're correct. I've added a footnote to that part now. I think it still illustrates the point so I've left the main text alone.