Re: How to get the list of all my open file(descriptor)s and locks?
On Wed, Sep 19, 2012 at 11:34 AM, Ismael Farfán <firstname.lastname@example.org> wrote:
> 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?
> Some more info:
> I'm working with exotic stuff like AIX and Solaris 10 (Windows and
> linux too :) and my lowest common denominator is python 2.3.
You could do:
os.listdir("/proc/%d/fd" % os.getpid())
This should work on Linux, AIX, and Solaris, but obviously not on Windows.
|All times are GMT. The time now is 05:16 AM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.