textmode for stdout, what is "correct" now?
Corinna Vinschen
corinna-cygwin@cygwin.com
Mon Feb 18 16:04:00 GMT 2019
On Feb 18 15:45, Michael Haubenwallner wrote:
> On 2/18/19 2:15 PM, Corinna Vinschen wrote:
> > You have two modes for input and three for output:
> >
> > - input O_BINARY -> only \n
> > - input O_TEXT -> \n and \r\n
> >
> > - output 0 -> generates \n or \r\n depending on mount mode
> > - output O_BINARY -> generates \n
> > - output O_TEXT -> generates \r\n
>
> Erm, even for input there is mode 0: strips \r depending on mount mode.
Right.
> This actually is without using setmode() at all.
> Shouldn't the default (mode 0) behave like O_TEXT for input?
POSIXy binary mode is the only sane default. Apps reading binary input
would start to misbehave otherwise. That's why text mount mode should be
used with care :}
Corinna
--
Corinna Vinschen
Cygwin Maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20190218/04f1757e/attachment.sig>
More information about the Cygwin
mailing list