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


Groups > comp.lang.python > #29510

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

Path csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <sulfurfff@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.008
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; '(at': 0.03; 'interpreter': 0.04; 'subject:file': 0.07; 'subject:How': 0.09; 'python': 0.09; 'aix': 0.09; 'least)': 0.09; 'satisfy': 0.09; '"by': 0.16; '(windows': 0.16; 'descriptors': 0.16; 'fcntl': 0.16; 'optionally': 0.16; 'preserved': 0.16; 'default,': 0.22; "i'd": 0.22; 'cheers': 0.24; 'linux': 0.24; 'script': 0.24; 'common': 0.26; 'message-id:@mail.gmail.com': 0.27; 'received:209.85.212': 0.28; 'subject:list': 0.28; 'concern': 0.29; 'locks': 0.29; 'question:': 0.29; 'them?': 0.29; 'subject:all': 0.29; "i'm": 0.29; '(from': 0.30; 'stuff': 0.30; 'expect': 0.31; 'file': 0.32; 'solaris': 0.33; 'to:addr:python-list': 0.33; 'know.': 0.33; 'received:google.com': 0.34; 'list': 0.35; 'needed': 0.35; 'open': 0.35; 'subject:?': 0.35; 'received:209.85': 0.35; 'test': 0.36; 'too': 0.36; 'does': 0.37; 'received:209': 0.37; 'some': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'help': 0.40; 'information': 0.63; 'more': 0.63; 'within': 0.64; 'subject:get': 0.81; '2.3.': 0.84; 'are...': 0.84; 'induce': 0.84; 'alone.': 0.91; 'yours.': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=0ZuLghdyLozAxRb1UBFulfrDIBg0CWBVk0Slsfn0O4I=; b=LfjIFycHplRggMN1smCJA5ap8lLoAq5lH7dIqEfreTK/9Q8g76s0yvMSXWxychHOny 7NqVqlMiyMAf/DIvK8/5xBQpDtkqcLESqxwybjkfaaSlbAtSsKLx/ouNrNyRtInBsOuQ s7BvpcdXIYFgTnzBqIfT216UXriosUnO70XxvUcYS3tbY3g6eyvz0PgVuoduTrf0zg9G pg/WjHO1dyzGcnCRFzpTpahEXy/D0wDKIRZ7D2L4CLFrIcbigug+SGpTvFD4WUrGG255 A6vr/Ad9yQSmurNrQ0vU5d+put3YOZl6tMAYpjlt38A8umBDY+Cq05FqV/ljKYQOLc39 c3LQ==
MIME-Version 1.0
Date Wed, 19 Sep 2012 12:34:25 -0500
Subject How to get the list of all my open file(descriptor)s and locks?
From Ismael Farfán <sulfurfff@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.928.1348076066.27098.python-list@python.org> (permalink)
Lines 31
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1348076066 news.xs4all.nl 6920 [2001:888:2000:d::a6]:55460
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:29510

Show key headers only | View raw


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?


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.

>From a standalone test within the interpreter I'd expect to get (at
least) std(in/out/err).

If more information is needed in order to help me, please let me know.

Cheers
Ismael


-- 
Do not let me induce you to satisfy my curiosity, from an expectation,
that I shall gratify yours. What I may judge proper to conceal, does
not concern myself alone.

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


Thread

How to get the list of all my open file(descriptor)s and locks? Ismael Farfán <sulfurfff@gmail.com> - 2012-09-19 12:34 -0500

csiph-web