[mingw32] stdin redirection

Daniel Jacobowitz drow@false.org
Wed Apr 11 14:45:00 GMT 2007


On Wed, Apr 11, 2007 at 03:42:19PM +0200, Jerome Guitton wrote:
> Hi all,
> 
> We noticed that a migw32-hosted GDB would freeze if commands are sent
> through stdin (e.g. gdb < send.gdb).
> 
> It appears that it keeps waiting on WaitForMultipleObjects, in
> gdb_select.
> 
> We also noticed that this bug only happens if a call to PeekNamedPipe
> (in fd_is_pipe, in ser-mingw.c), with the file descriptor of stdin In
> this particular case, this call always return 0; so we have added the
> following kludge in our sources, to "fix" this issue:

This paragraph is a little garbled.  PeekNamedPipe is failing
(returning 0), right?  Or does PeekNamedPipe succeed when reading from
a file descriptor?


-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb mailing list