Mail Archives: djgpp-workers/1999/04/08/07:48:11
> Imagine a program that switches stdin to binary mode and also
> redirects it to a file with `dup'.
> With your change, the result will depend on the order of these
> two operations: in one case, you wind up with an unbuffered file,
> in the other it is buffered.
Yep. I thought of dup, but not long enough :-)
> So at least some changes in other functions, like `dup' and `dup2'
> will be necessary to prevent these subtle ``features''.
Or put the buffering-check in... fillbuf or whatever it is called.
> I thought setmode.txh already tells enough about this issue. If not,
> please tell what's missing.
I'll take a look again when I am back with my DJGPP computer...
> > It seems this problem is already known among some DJGPP
> > "porters" but not all. We (someone how knows most about this)
> > should document this somewhere at least...
> I agree, and I put this information in setmode.txh, open.txh,
> fopen.txh, and signal.txh exactly for that reason. Again, if
> something's missing from that description, please tell what it is.
Ok.
Groente, Michel.
- Raw text -