From 025594aa80109ced31ea3ea8fec4eb50e964bdc3 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 18 Sep 2013 11:29:27 -0700 Subject: [PATCH] SpawnProcess: enable FD_CLOEXEC for Darwin Bug #456296 is now handled by the F_GETFD/F_SETFD commands in commit 30c652a9db1014fc720f7d6055520a07b731c984. --- pym/_emerge/SpawnProcess.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pym/_emerge/SpawnProcess.py b/pym/_emerge/SpawnProcess.py index b36d15f69..15d3dc5cf 100644 --- a/pym/_emerge/SpawnProcess.py +++ b/pym/_emerge/SpawnProcess.py @@ -9,7 +9,6 @@ except ImportError: import errno import logging -import platform import signal import sys @@ -20,11 +19,6 @@ from portage.const import BASH_BINARY from portage.util import writemsg_level from portage.util._async.PipeLogger import PipeLogger -# On Darwin, FD_CLOEXEC triggers errno 35 for stdout (bug #456296) -# TODO: Test this again now that it's been fixed to use -# F_GETFD/F_SETFD instead of F_GETFL/F_SETFL. -_disable_cloexec_stdout = platform.system() in ("Darwin",) - class SpawnProcess(SubProcess): """ @@ -128,7 +122,7 @@ class SpawnProcess(SubProcess): if can_log and not self.background: stdout_fd = os.dup(fd_pipes_orig[1]) # FD_CLOEXEC is enabled by default in Python >=3.4. - if sys.hexversion < 0x3040000 and fcntl is not None and not _disable_cloexec_stdout: + if sys.hexversion < 0x3040000 and fcntl is not None: try: fcntl.FD_CLOEXEC except AttributeError: -- 2.26.2