Re: [mingw32] stdin redirection

Daniel Jacobowitz
2007-04-11T15:12:47Z

On Wed, Apr 11, 2007 at 04:51:04PM +0200, Jerome Guitton wrote:
> Daniel Jacobowitz (drow@false.org):
>
> > This paragraph is a little garbled. PeekNamedPipe is failing
> > (returning 0), right? Or does PeekNamedPipe succeed when reading from
> > a file descriptor?
>
> Right. PeekNamedPipe fails and returns 0.

So fd_is_pipe returns zero either way, but something about calling
PeekNamedPipe on a non-pipe disturbs what happens later, you're saying.

How did it get into WaitForMultipleObjects? Did isatty return true -
in which case it shouldn't have called fd_is_pipe? Otherwise, see the
call site, where no handle is provided. So we must be falling back to
the file handle (mingw-hdep.c). Maybe we need to do something
different to simulate select on a file.

--
Daniel Jacobowitz
CodeSourcery