From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32113 invoked by alias); 9 Oct 2013 17:29:01 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 32102 invoked by uid 89); 9 Oct 2013 17:29:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout21.012.net.il Received: from mtaout21.012.net.il (HELO mtaout21.012.net.il) (80.179.55.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 09 Oct 2013 17:29:00 +0000 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MUE00200WEMKH00@a-mtaout21.012.net.il> for gdb-patches@sourceware.org; Wed, 09 Oct 2013 20:28:58 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MUE0028YWK7IE50@a-mtaout21.012.net.il>; Wed, 09 Oct 2013 20:28:55 +0300 (IDT) Date: Wed, 09 Oct 2013 17:29:00 -0000 From: Eli Zaretskii Subject: Re: [patch] Minor O_CLOEXEC optimization, "regression" fix In-reply-to: <87ob6ybcdc.fsf@fleche.redhat.com> To: Tom Tromey Cc: jan.kratochvil@redhat.com, ktietz@redhat.com, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83bo2yqrop.fsf@gnu.org> References: <20131008183214.GB27355@host2.jankratochvil.net> <87li23fsym.fsf@fleche.redhat.com> <20131009131016.GA1603@host2.jankratochvil.net> <83hacqqsx7.fsf@gnu.org> <87ob6ybcdc.fsf@fleche.redhat.com> X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00310.txt.bz2 > From: Tom Tromey > Cc: Jan Kratochvil , ktietz@redhat.com, > gdb-patches@sourceware.org > Date: Wed, 09 Oct 2013 11:08:47 -0600 > > >>>>> "Eli" == Eli Zaretskii writes: > > Eli> Please don't do that. On latest versions of Windows, the runtime > Eli> library functions tend to invoke the "invalid parameter handler" in > Eli> these cases, which more often than not will crash the program. > > The status quo ante was to do the call but not check for EINVAL. > So the bug, if there is one, is already there. > Can you check? I could check, if I know what to check. This patch confused me: it tests whether O_CLOEXEC is zero, which it is on Windows, so there should be no need to try "e" at all. Therefore, I don't understand why this is still an issue. What am I missing?