aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-02-15 16:33:10 -0800
committerZac Medico <zmedico@gentoo.org>2012-02-15 16:33:10 -0800
commit46107423f4a039af6528d14cb86123a05a67f85f (patch)
tree38396f84b7ee738da816a484474c4aeadad85c82 /pym/portage/dbapi
parentSpawnProcess: use os.open for /dev/null input (diff)
downloadportage-46107423f4a039af6528d14cb86123a05a67f85f.tar.gz
portage-46107423f4a039af6528d14cb86123a05a67f85f.tar.bz2
portage-46107423f4a039af6528d14cb86123a05a67f85f.zip
Comment about _setup_pipes / PyPy GC interaction.
Diffstat (limited to 'pym/portage/dbapi')
-rw-r--r--pym/portage/dbapi/_MergeProcess.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/portage/dbapi/_MergeProcess.py b/pym/portage/dbapi/_MergeProcess.py
index 21d43dd83..9a185b4a6 100644
--- a/pym/portage/dbapi/_MergeProcess.py
+++ b/pym/portage/dbapi/_MergeProcess.py
@@ -157,7 +157,11 @@ class MergeProcess(SpawnProcess):
os.close(elog_reader_fd)
# TODO: Find out why PyPy 1.8 with close_fds=True triggers
- # "[Errno 9] Bad file descriptor" in subprocesses.
+ # "[Errno 9] Bad file descriptor" in subprocesses. It could
+ # be due to garbage collection of file objects that were not
+ # closed before going out of scope, since PyPy's garbage
+ # collector does not support the refcounting semantics that
+ # CPython does.
close_fds = platform.python_implementation() != 'PyPy'
portage.process._setup_pipes(fd_pipes, close_fds=close_fds)