Lists Home |
Date Index |
From: "John Cowan" <email@example.com>
> Rick Jelliffe scripsit:
> > So if you can send ^D down your UNIX pipes, it is because the specific programs in the
> > pipeline happen to be reading the input stream in binary mode not text mode.
> There is no such distinction at all in Unix. If some stdio operations on
> Windows terminate when they see a #x19 in the input, it is purely for CP/M
> compatibility (no :-) ).
Where did I say it was a distinction built into UNIX?
I said "it is because the specific programs". And I gave examples of the
APIs from C++, Python, Haskell and Perl where this can happen.
Also I wrote: "a file opened in text mode through stdio may have embedded ^D (UNIX)
or ^Z (PC) converted to EOF by the standard library routines that read/write from/to
stdio and present them to the application. This is independent of terminal signals,
such as sending ^D to a shell."
Again this is attributing it to the library routines (the API) not the operating system.
The specific program would use text mode primarily because they
want to have newlines handled by local conventions.