import errno
import logging
-import platform
import signal
import sys
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):
"""
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: