Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #90857

Re: fork/exec & close file descriptors

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 <skip.montanaro@gmail.com>
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&gt;': 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 <CAPTjJmrdPcW8EkLR9Kq+n9sYEWB8eJ3fg=_JFQ2x_4QhDeg90Q@mail.gmail.com>
References <CANc-5UyeaWqThGFSAuGskz+S2Lrgq0ia9W9DHAie28t9GY+sww@mail.gmail.com> <CAPTjJmoj4STV9+t2-9JWed3t6Hxk5ibtaxYSFfX31oGz=kKR1g@mail.gmail.com> <CANc-5UwUxYjg=rQQ0Z_nM3s7o4+ghVYzG-9ajQY=LERWAsPrKw@mail.gmail.com> <CAPTjJmrdPcW8EkLR9Kq+n9sYEWB8eJ3fg=_JFQ2x_4QhDeg90Q@mail.gmail.com>
Date Tue, 19 May 2015 09:31:14 -0500
Subject Re: fork/exec & close file descriptors
From Skip Montanaro <skip.montanaro@gmail.com>
To Chris Angelico <rosuav@gmail.com>
Cc Python <python-list@python.org>
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 <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.139.1432045882.17265.python-list@python.org> (permalink)
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

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On Tue, May 19, 2015 at 8:54 AM, Chris Angelico <rosuav@gmail.com> 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

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: fork/exec & close file descriptors Skip Montanaro <skip.montanaro@gmail.com> - 2015-05-19 09:31 -0500
  Re: fork/exec & close file descriptors Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-05-20 13:10 +1200
    Re: fork/exec & close file descriptors Ian Kelly <ian.g.kelly@gmail.com> - 2015-05-20 12:30 -0600

csiph-web