From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19407 invoked by alias); 11 Apr 2007 14:45:00 -0000 Received: (qmail 19399 invoked by uid 22791); 11 Apr 2007 14:44:59 -0000 X-Spam-Check-By: sourceware.org Received: from return.false.org (HELO return.false.org) (66.207.162.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 11 Apr 2007 15:44:55 +0100 Received: from return.false.org (localhost [127.0.0.1]) by return.false.org (Postfix) with ESMTP id 8761E4B267; Wed, 11 Apr 2007 09:44:53 -0500 (CDT) Received: from caradoc.them.org (dsl093-172-095.pit1.dsl.speakeasy.net [66.93.172.95]) by return.false.org (Postfix) with ESMTP id 73B304B262; Wed, 11 Apr 2007 09:44:53 -0500 (CDT) Received: from drow by caradoc.them.org with local (Exim 4.63) (envelope-from ) id 1Hbe43-0005XU-Sa; Wed, 11 Apr 2007 10:44:51 -0400 Date: Wed, 11 Apr 2007 14:45:00 -0000 From: Daniel Jacobowitz To: Jerome Guitton Cc: gdb@sourceware.org Subject: Re: [mingw32] stdin redirection Message-ID: <20070411144451.GA21140@caradoc.them.org> Mail-Followup-To: Jerome Guitton , gdb@sourceware.org References: <20070411134219.GA33609@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070411134219.GA33609@adacore.com> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-04/txt/msg00064.txt.bz2 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