>>49
Pretty sure UNIX has handled text line-by-line for decades. Run cat, type ``hello'', hit Return, it prints ``hello''.
NO!
That's the
terminal's line buffering. Read gets absolutely
nothing until you press enter. If you pipe shit into cat instead of having it bind to line-buffered stdin, read gets input in blocks, which are independent from where the '\n' is.
Making a general I/O system call internally line-buffered is idiotic.