From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7043 invoked by alias); 12 Jan 2006 20:40:08 -0000 Received: (qmail 7035 invoked by uid 22791); 12 Jan 2006 20:40:08 -0000 X-Spam-Check-By: sourceware.org Received: from cgf.cx (HELO cgf.cx) (24.61.23.223) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Thu, 12 Jan 2006 20:40:05 +0000 Received: by cgf.cx (Postfix, from userid 201) id E00A213C23A; Thu, 12 Jan 2006 15:40:03 -0500 (EST) Date: Thu, 12 Jan 2006 20:40:00 -0000 From: Christopher Faylor To: Mark Mitchell , gdb-patches@sources.redhat.com Subject: Re: PATCH: Detect closed file descriptors on Windows Message-ID: <20060112204003.GA2887@trixie.casa.cgf.cx> Mail-Followup-To: Mark Mitchell , gdb-patches@sources.redhat.com References: <200601112147.k0BLlatG000696@sethra.codesourcery.com> <8f2776cb0601111639r61642795la665387645e44bfa@mail.gmail.com> <43C67C4C.7090605@codesourcery.com> <8f2776cb0601121222j2937998dn2bd5670af1692b3e@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8f2776cb0601121222j2937998dn2bd5670af1692b3e@mail.gmail.com> User-Agent: Mutt/1.5.11 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00129.txt.bz2 On Thu, Jan 12, 2006 at 12:22:28PM -0800, Jim Blandy wrote: >On 1/12/06, Mark Mitchell wrote: >> Jim Blandy wrote: >> > On 1/11/06, Mark Mitchell wrote: >> > >> >> gdb_assert (!FD_ISSET (fd, writefds)); >> >>! if (FD_ISSET (fd, readfds) >> >>! && !FD_ISSET (fd, exceptfds)) >> >>! continue; >> > >> > >> > Don't you mean, "if (! FD_ISSET (fd, readfds) && ..."? >> >> Definitely. >> >> I got lucky because GDB (at least in simple cases) tends to pass the >> same set of descriptors for readfds and exceptfds. >> >> OK with that change? > >Yes, it looks fine to me. > >It's a shame that even though readfds, writefds, and exceptfds look >parallel in the interface, each of them is handled rather differently >in the code (i.e., writefds is asserted to be correct as passed; >exceptfds is made correct by the handle-collecting loop; and readfds >is pared down to the correct set after the call). But I don't think >that's your problem to fix. That would be Windows problem to fix, I think. :-) >If I'm reading gdb/MAINTAINERS right, Chris Faylor is the one who >needs to approve this; his entry doesn't restrict his oversight to >Cygwin Windows, which is what I thought he was interested in. Go ahead and check it in, Mark. cgf