This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: [mingw32] stdin redirection
- From: Daniel Jacobowitz <drow at false dot org>
- To: Jerome Guitton <guitton at adacore dot com>
- Cc: gdb at sourceware dot org
- Date: Wed, 11 Apr 2007 10:44:51 -0400
- Subject: Re: [mingw32] stdin redirection
- References: <20070411134219.GA33609@adacore.com>
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