From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27018 invoked by alias); 18 Dec 2012 22:12:37 -0000 Received: (qmail 27006 invoked by uid 22791); 18 Dec 2012 22:12:36 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-out.m-online.net (HELO mail-out.m-online.net) (212.18.0.9) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 18 Dec 2012 22:12:29 +0000 Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3YQtkz1tlXz4KKJq; Tue, 18 Dec 2012 23:12:26 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3YQtky3nP2zbbg8; Tue, 18 Dec 2012 23:12:26 +0100 (CET) Received: from mail.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id Cdy8WpDD4tga; Tue, 18 Dec 2012 23:12:25 +0100 (CET) X-Auth-Info: Xmr5EtcqIkUKzbwQODoFj1UigUJSr3/NOdQlyed+0iM= Received: from igel.home (ppp-88-217-123-144.dynamic.mnet-online.de [88.217.123.144]) by mail.mnet-online.de (Postfix) with ESMTPA; Tue, 18 Dec 2012 23:12:25 +0100 (CET) Received: by igel.home (Postfix, from userid 501) id CC488CA2B2; Tue, 18 Dec 2012 23:12:24 +0100 (CET) From: Andreas Schwab To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: RFC: close-on-exec internal file descriptors References: <874njjs1aa.fsf@fleche.redhat.com> X-Yow: Is this going to involve RAW human ecstasy? Date: Tue, 18 Dec 2012 22:12:00 -0000 In-Reply-To: <874njjs1aa.fsf@fleche.redhat.com> (Tom Tromey's message of "Tue, 18 Dec 2012 10:44:29 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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 X-SW-Source: 2012-12/txt/msg00667.txt.bz2 Tom Tromey writes: > @@ -314,6 +315,8 @@ fork_inferior (char *exec_file_arg, char *allargs, char **env, > > if (pid == 0) > { > + closefrom (3); > + I don't think you can use closefrom here. The debuggee might depend on inherited descriptors, and gdb should be fully transparent here. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."