From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12668 invoked by alias); 11 Apr 2007 15:12:47 -0000 Received: (qmail 12659 invoked by uid 22791); 11 Apr 2007 15:12:46 -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 16:12:37 +0100 Received: from return.false.org (localhost [127.0.0.1]) by return.false.org (Postfix) with ESMTP id 945E54B26F for ; Wed, 11 Apr 2007 10:12:36 -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 66FB34B26D for ; Wed, 11 Apr 2007 10:12:36 -0500 (CDT) Received: from drow by caradoc.them.org with local (Exim 4.63) (envelope-from ) id 1HbeUt-0005vH-9L for gdb@sourceware.org; Wed, 11 Apr 2007 11:12:35 -0400 Date: Wed, 11 Apr 2007 15:12:00 -0000 From: Daniel Jacobowitz To: gdb@sourceware.org Subject: Re: [mingw32] stdin redirection Message-ID: <20070411151234.GA22185@caradoc.them.org> Mail-Followup-To: gdb@sourceware.org References: <20070411134219.GA33609@adacore.com> <20070411144451.GA21140@caradoc.them.org> <20070411145104.GE58502@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070411145104.GE58502@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/msg00066.txt.bz2 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