Mail Archives: cygwin-developers/2002/08/26/10:55:06
"Corinna Vinschen" <vinschen AT redhat DOT com> wrote:
>
> On Mon, Aug 26, 2002 at 03:20:00PM +0100, Conrad Scott wrote:
> >
> > At the coal-face it ends up being a bit more messy than that.
For
> > example, the fhandler::read code checks the readahead buffers
for
> > pending data but they will always be empty in binary-mode
(AFAIK)
> > . In fact there's a page of code before the check for whether
a
> > binary read is being done and only then does the code escape
back
> > to the caller. Since (AFAIK) you can't change the text/binary
> > mode of an fd once it's been opened (and thus the readahead
>
> You can. setmode(fd, O_TEXT); or setmode(fd, O_BINARY);
Sorry: I'd missed that in my meanderings about the source. Thanks
for the pointer.
And as for my comments about the readahead buffer in text-mode
handling: well, I was only thinking about "fast" devices; you
couldn't just flush the readahead in general. Even if the
text-mode support were removed from fhandler_serial, as Chris
suggested, there're still pipes to worry about.
So, I'll go and worry about something else instead :-)
// Conrad
- Raw text -