From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23709 invoked by alias); 9 Oct 2013 17:58:21 -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 23700 invoked by uid 89); 9 Oct 2013 17:58:21 -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: mtaout22.012.net.il Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 09 Oct 2013 17:58:19 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MUE00A00XV5NZ00@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Wed, 09 Oct 2013 20:58:14 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MUE00AWMXX1A7B0@a-mtaout22.012.net.il>; Wed, 09 Oct 2013 20:58:14 +0300 (IDT) Date: Wed, 09 Oct 2013 17:58:00 -0000 From: Eli Zaretskii Subject: Re: [patch] Minor O_CLOEXEC optimization, "regression" fix In-reply-to: <20131009174124.GA20135@host2.jankratochvil.net> To: Jan Kratochvil Cc: tromey@redhat.com, ktietz@redhat.com, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <837gdmqqbv.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> <83bo2yqrop.fsf@gnu.org> <20131009174124.GA20135@host2.jankratochvil.net> X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00313.txt.bz2 > Date: Wed, 9 Oct 2013 19:41:24 +0200 > From: Jan Kratochvil > Cc: Tom Tromey , ktietz@redhat.com, > gdb-patches@sourceware.org > > On Wed, 09 Oct 2013 19:28:54 +0200, Eli Zaretskii wrote: > > 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. > > If O_CLOEXEC is 0 then the "e" flag is not tried at all, therefore it could > not crash on MS-Windows. That's what I thought. > > Therefore, I don't understand why this is still an issue. What am I > > missing? > > On platforms where O_CLOEXEC is 0 this new patch has no effect. Then why did you ask this upthread: > May one rely on MS-Windows fopen("","re") will fail with EINVAL if it fails > because of the "e" flag, Kai? It is in GDB function gdb_fopen_cloexec. ? That's what confused me. Sorry if I missed something.