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


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

Re: How to get the list of all my open file(descriptor)s and locks?

Started byChristian Heimes <christian@python.org>
First post2012-09-20 02:39 +0200
Last post2012-09-20 02:39 +0200
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: How to get the list of all my open file(descriptor)s and locks? Christian Heimes <christian@python.org> - 2012-09-20 02:39 +0200

#29533 — Re: How to get the list of all my open file(descriptor)s and locks?

FromChristian Heimes <christian@python.org>
Date2012-09-20 02:39 +0200
SubjectRe: How to get the list of all my open file(descriptor)s and locks?
Message-ID<mailman.946.1348101909.27098.python-list@python.org>
Am 19.09.2012 19:34, schrieb Ismael Farfán:
> Hello list
> 
> From man 2 EXECVE
> "By default, file descriptors remain open across an execve()"
> 
> And from man 2 FCNTL
> "Record locks are... preserved across an execve(2)."
> 
> So the question:
> * If I execve a python script (from C), how can I retrieve the list of
> files, and optionally the list of locks, from within the execve(d)
> python process so that I can use them?

Have a look at psutil:

http://code.google.com/p/psutil/#Process_management

Christian

[toc] | [standalone]


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


csiph-web