From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18142 invoked by alias); 19 Nov 2018 22:06:53 -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 18129 invoked by uid 89); 19 Nov 2018 22:06:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Eli X-HELO: gateway33.websitewelcome.com Received: from gateway33.websitewelcome.com (HELO gateway33.websitewelcome.com) (192.185.145.87) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 Nov 2018 22:06:51 +0000 Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway33.websitewelcome.com (Postfix) with ESMTP id 417471FDF541 for ; Mon, 19 Nov 2018 16:06:50 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id OrgwgV2q7FxNhOrgwghwy2; Mon, 19 Nov 2018 16:06:50 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Xes8bUxugzRyvfa7B8dJe5JBm0CK6azZgWWtgifL/7o=; b=dw/M9FRwnXFqhJecoy9xIBrmbH 4Hy2J2IbTrynfpegISGQCfjen/KzNWpxcuTnSKsihU60b1wT4o7lDOFc7LdoCW3auLE4kNr8kXYRP vNFEQuPsDg13GF2oUhw/CuKjg; Received: from 97-122-190-66.hlrn.qwest.net ([97.122.190.66]:47512 helo=pokyo) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1gOrgv-000ibj-Ue; Mon, 19 Nov 2018 16:06:50 -0600 From: Tom Tromey To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: "Invalid parameter passed to C runtime function" from MinGW GDB References: <838t1qtjty.fsf@gnu.org> Date: Mon, 19 Nov 2018 22:06:00 -0000 In-Reply-To: <838t1qtjty.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 18 Nov 2018 18:46:17 +0200") Message-ID: <874lccpvra.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2018-11/txt/msg00304.txt.bz2 >>>>> "Eli" == Eli Zaretskii writes: Eli> I propose to fix this as below. Any objections to committing this to Eli> master (with a suitable ChangeLog, of course)? Eli> diff --git a/gdb/common/filestuff.c b/gdb/common/filestuff.c Eli> index d4bd1a8..3fa035a 100644 Eli> --- a/gdb/common/filestuff.c Eli> +++ b/gdb/common/filestuff.c Eli> @@ -300,8 +300,10 @@ gdb_fopen_cloexec (const char *filename, const char *opentype) Eli> skip it. E.g., the Windows runtime issues an "Invalid parameter Eli> passed to C runtime function" OutputDebugString warning for Eli> unknown modes. Assume that if O_CLOEXEC is zero, then "e" isn't Eli> - supported. */ Eli> - static int fopen_e_ever_failed_einval = O_CLOEXEC == 0; Eli> + supported. On MinGW, O_CLOEXEC is an alias of O_NOINHERIT, and Eli> + "e" isn't supported. */ Eli> + static int fopen_e_ever_failed_einval = Eli> + O_CLOEXEC == 0 || O_CLOEXEC == O_NOINHERIT; Looks reasonable to me, thanks. Tom