Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!weretis.net!feeder4.news.weretis.net!feeder2.ecngs.de!ecngs!feeder.ecngs.de!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.020 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'subject:file': 0.07; 'skip:/ 10': 0.09; 'cc:addr:python-list': 0.11; 'descriptors': 0.16; 'linux).': 0.16; 'wrote:': 0.18; 'appears': 0.22; 'email addr:gmail.com>': 0.22; 'cc:addr:python.org': 0.22; 'entries': 0.24; 'skip': 0.24; 'cc:2**0': 0.24; 'possibly': 0.26; 'subject:/': 0.26; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'file': 0.32; 'open': 0.33; 'linux': 0.33; 'point.': 0.35; 'received:google.com': 0.35; 'use.': 0.39; 'to:addr:gmail.com': 0.65; 'subject: & ': 0.68; '2015': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=44YUmNLCo61x9WK068TGMa00YnMNXKivvsCFAbaVEe4=; b=b20JKAUrKoL9pHOU/2C0PKSwGJV6lSSm2b3NxbgYUvTjLI4bLDWjB9fT/ZgwwK6dB6 nnaucKnLJuoaJAe+dM3WdFrcq1tOTEXPtQI5XC63/8IwwqZhTGKQalBUB05kPY7K2L0g Dz5p/15LmY6AkF7k1yCNBh1FGTdGfUV/Z9TisLx2Vb9cQA1q60HXxWdxAepWTiK6kod2 ogc4ecKYbGXjBuq5MKgGj9gZWriBQoaz09X0gbphI7NCQcKOSbiiE2mK/ofOv2HNwZ/L voU3B1eZf6Dcb9QeD8G7zRg/djMTuIz4+THdfJ6hq+1qQx68lQKZBcWANV2LhOg3juEF v4vA== MIME-Version: 1.0 X-Received: by 10.202.193.8 with SMTP id r8mr604555oif.27.1432045874437; Tue, 19 May 2015 07:31:14 -0700 (PDT) In-Reply-To: References: Date: Tue, 19 May 2015 09:31:14 -0500 Subject: Re: fork/exec & close file descriptors From: Skip Montanaro To: Chris Angelico Cc: Python Content-Type: multipart/alternative; boundary=001a113cd73ca5e4c80516702998 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 31 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1432045882 news.xs4all.nl 2901 [2001:888:2000:d::a6]:53670 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:90857 --001a113cd73ca5e4c80516702998 Content-Type: text/plain; charset=UTF-8 On Tue, May 19, 2015 at 8:54 AM, Chris Angelico wrote: > On Linux (and possibly some other Unixes), /proc/self/fd may be of > use. > Good point. Yes, /proc/PID/fd appears to contain all the entries for open file descriptors (I am on Linux). Skip --001a113cd73ca5e4c80516702998 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= On Tue, May 19, 2015 at 8:54 AM, Chris Angelico <rosuav@gmail.com> wrote:
On Linux (and possibly some other Unixes), /pr= oc/self/fd may be of
use.

Good point. Yes, /proc/PID/fd appears to c= ontain all the entries for open file descriptors (I am on Linux).

Skip

--001a113cd73ca5e4c80516702998--