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


Groups > comp.lang.python > #90861 > unrolled thread

Re: fork/exec & close file descriptors

Started byChris Angelico <rosuav@gmail.com>
First post2015-05-20 01:13 +1000
Last post2015-05-20 01:13 +1000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: fork/exec & close file descriptors Chris Angelico <rosuav@gmail.com> - 2015-05-20 01:13 +1000

#90861 — Re: fork/exec & close file descriptors

FromChris Angelico <rosuav@gmail.com>
Date2015-05-20 01:13 +1000
SubjectRe: fork/exec & close file descriptors
Message-ID<mailman.140.1432048432.17265.python-list@python.org>
On Wed, May 20, 2015 at 12:31 AM, Skip Montanaro
<skip.montanaro@gmail.com> wrote:
> 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).

Yes, and /proc/self is usually a magic symlink to /proc/<your_pid> so
you can just look at /proc/self/fd instead of explicitly calling up
your own PID.

ChrisA

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web