projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa3a424
)
Make the reading of /proc/<pid>/fd/ impervious to the possible addition
author
Jason Stubbs
<jstubbs@gentoo.org>
Sun, 2 Apr 2006 08:05:36 +0000
(08:05 -0000)
committer
Jason Stubbs
<jstubbs@gentoo.org>
Sun, 2 Apr 2006 08:05:36 +0000
(08:05 -0000)
of non-numerically named entries.
svn path=/main/trunk/; revision=3055
pym/portage_exec.py
patch
|
blob
|
history
diff --git
a/pym/portage_exec.py
b/pym/portage_exec.py
index e800376dcfd5e6c0728e64a677f91059c4c6fd6f..4f7fef2b9c31934946408aa00461ffef081a4d44 100644
(file)
--- a/
pym/portage_exec.py
+++ b/
pym/portage_exec.py
@@
-19,7
+19,7
@@
except ImportError:
if os.path.isdir("/proc/%i/fd" % os.getpid()):
def get_open_fds():
- return map(int,
os.listdir("/proc/%i/fd" % os.getpid())
)
+ return map(int,
[fd for fd in os.listdir("/proc/%i/fd" % os.getpid()) if fd.isdigit()]
)
else:
def get_open_fds():
return xrange(max_fd_limit)