Staging
v0.5.1
https://github.com/python/cpython
Revision b90c68586e1f2c45c736dd38880f182be267e2ef authored by Miss Islington (bot) on 06 February 2018, 06:51:10 UTC, committed by Gregory P. Smith on 06 February 2018, 06:51:10 UTC
Fix a rare but potential pre-exec child process deadlock in subprocess on POSIX systems when marking file descriptors inheritable on exec in the child process.  This bug appears to have been introduced in 3.4 with the inheritable file descriptors support.

This also changes Python/fileutils.c `set_inheritable` to use the "slow" two `fcntl` syscall path instead of the "fast" single `ioctl` syscall path when asked to be async signal safe (by way of being asked not to raise exceptions).  `ioctl` is not a POSIX async-signal-safe approved function.

ref: http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html
(cherry picked from commit c1e46e94de38a92f98736af9a42d89c3975a9919)

Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
1 parent 7bd5a75
Raw File
Tip revision: b90c68586e1f2c45c736dd38880f182be267e2ef authored by Miss Islington (bot) on 06 February 2018, 06:51:10 UTC
bpo-32777: Fix _Py_set_inheritable async-safety in subprocess (GH-5560) (GH-5563)
Tip revision: b90c685
.hgignore
.gdb_history
.purify
.svn/
^.idea/
^.vscode/
.DS_Store
Makefile$
Makefile.pre$
TAGS$
autom4te.cache$
^build/
^Doc/build/
^Doc/venv/
buildno$
config.cache
config.log
config.status
config.status.lineno
db_home
platform$
pyconfig.h$
python$
python.bat$
python.exe$
python-config$
python-config.py$
reflog.txt$
tags$
Misc/python.pc
Misc/python-config.sh$
Modules/Setup$
Modules/Setup.config
Modules/Setup.local
Modules/config.c
Modules/ld_so_aix$
Parser/pgen$
^lcov-report/
^core
^python-gdb.py
^python.exe-gdb.py
^pybuilddir.txt

syntax: glob
libpython*.a
libpython*.so*
libpython*.dylib
*.swp
*.o
*.pyc
*.pyo
*.pyd
*.cover
*~
*.gc??
*.profclang?
*.profraw
*.dyn
Include/pydtrace_probes.h
Lib/distutils/command/*.pdb
Lib/lib2to3/*.pickle
Lib/test/data/*
Misc/*.wpu
PC/python_nt*.h
PC/pythonnt_rc*.h
PC/*/*.exe
PC/*/*.exp
PC/*/*.lib
PC/*/*.bsc
PC/*/*.dll
PC/*/*.pdb
PC/*/*.user
PC/*/*.ncb
PC/*/*.suo
PC/*/Win32-temp-*
PC/*/x64-temp-*
PC/*/amd64
PCbuild/*.user
PCbuild/*.suo
PCbuild/*.*sdf
PCbuild/*-pgi
PCbuild/*-pgo
PCbuild/.vs
PCbuild/amd64
PCbuild/obj
PCbuild/win32
Tools/unicode/build/
Tools/unicode/MAPPINGS/
BuildLog.htm
__pycache__
Programs/_freeze_importlib
Programs/_testembed
.coverage
coverage/
externals/
htmlcov/
*.gcda
*.gcno
*.gcov
ipch/
coverage.info
Tools/msi/obj
Tools/ssl/amd64
Tools/ssl/win32
.vs/
.vscode/
back to top