_doebuild_spawn: disable close_fds for "depend"
authorZac Medico <zmedico@gentoo.org>
Thu, 3 Jan 2013 23:55:42 +0000 (15:55 -0800)
committerZac Medico <zmedico@gentoo.org>
Thu, 3 Jan 2013 23:55:42 +0000 (15:55 -0800)
pym/portage/package/ebuild/doebuild.py

index 855c62aede748b147cab69fe041eb8aefcbd4666..ff7776cceb1c5aad76a1e870276316f1abf3feeb 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2010-2012 Gentoo Foundation
+# Copyright 2010-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 __all__ = ['doebuild', 'doebuild_environment', 'spawn', 'spawnebuild']
@@ -110,6 +110,11 @@ def _doebuild_spawn(phase, settings, actionmap=None, **kwargs):
 
        if phase == 'depend':
                kwargs['droppriv'] = 'userpriv' in settings.features
+               # It's not necessary to close_fds for this phase, since
+               # it should not spawn any daemons, and close_fds is
+               # best avoided since it can interact badly with some
+               # garbage collectors (see _setup_pipes docstring).
+               kwargs['close_fds'] = False
 
        if actionmap is not None and phase in actionmap:
                kwargs.update(actionmap[phase]["args"])