From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1049 invoked by alias); 19 Dec 2012 14:53:14 -0000 Received: (qmail 1039 invoked by uid 22791); 19 Dec 2012 14:53:13 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 19 Dec 2012 14:52:40 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBJEqZW9015226 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 19 Dec 2012 09:52:36 -0500 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qBJEqX1v002806 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 19 Dec 2012 09:52:34 -0500 From: Tom Tromey To: Andreas Schwab Cc: gdb-patches@sourceware.org Subject: Re: RFC: close-on-exec internal file descriptors References: <874njjs1aa.fsf@fleche.redhat.com> Date: Wed, 19 Dec 2012 14:53:00 -0000 In-Reply-To: (Andreas Schwab's message of "Tue, 18 Dec 2012 23:12:23 +0100") Message-ID: <87fw32p00e.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.90 (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/msg00702.txt.bz2 >>>>> "Andreas" == Andreas Schwab writes: Andreas> I don't think you can use closefrom here. The debuggee might Andreas> depend on inherited descriptors, and gdb should be fully Andreas> transparent here. I had never heard of anybody doing this. I'll give it a try. If it works I suppose we'll need a new plan. One idea would be to see which file descriptors are open when gdb starts, and then preserve just those. Tom