aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/multiprocessing/util.py
diff options
context:
space:
mode:
authorRichard Oudkerk <shibturn@gmail.com>2013-08-28 11:25:34 +0100
committerRichard Oudkerk <shibturn@gmail.com>2013-08-28 11:25:34 +0100
commit0d097b6299b8c478982758bd1986dfc724ddf9ad (patch)
tree57646988a674db300a70d19f985155e14af20784 /Lib/multiprocessing/util.py
parent1fa174a418d78ef24aa741945230a5074b3e6236 (diff)
downloadcpython-0d097b6299b8c478982758bd1986dfc724ddf9ad.tar.gz
cpython-0d097b6299b8c478982758bd1986dfc724ddf9ad.zip
Issue #18865: PEP 446 makes multiprocessing.util.pipe() unnecessary.
Diffstat (limited to 'Lib/multiprocessing/util.py')
-rw-r--r--Lib/multiprocessing/util.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/Lib/multiprocessing/util.py b/Lib/multiprocessing/util.py
index ac8e9136c11..0aeb1018faf 100644
--- a/Lib/multiprocessing/util.py
+++ b/Lib/multiprocessing/util.py
@@ -358,13 +358,6 @@ def close_all_fds_except(fds):
def spawnv_passfds(path, args, passfds):
import _posixsubprocess, fcntl
passfds = sorted(passfds)
- tmp = []
- # temporarily unset CLOEXEC on passed fds
- for fd in passfds:
- flag = fcntl.fcntl(fd, fcntl.F_GETFD)
- if flag & fcntl.FD_CLOEXEC:
- fcntl.fcntl(fd, fcntl.F_SETFD, flag & ~fcntl.FD_CLOEXEC)
- tmp.append((fd, flag))
errpipe_read, errpipe_write = os.pipe()
try:
return _posixsubprocess.fork_exec(
@@ -374,16 +367,3 @@ def spawnv_passfds(path, args, passfds):
finally:
os.close(errpipe_read)
os.close(errpipe_write)
- # reset CLOEXEC where necessary
- for fd, flag in tmp:
- fcntl.fcntl(fd, fcntl.F_SETFD, flag)
-
-#
-# Return pipe with CLOEXEC set on fds
-#
-# Deprecated: os.pipe() creates non-inheritable file descriptors
-# since Python 3.4
-#
-
-def pipe():
- return os.pipe()