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
History
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
File Mode Size
.github
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Programs
Python
Tools
.bzrignore -rw-r--r-- 582 bytes
.gitattributes -rw-r--r-- 798 bytes
.gitignore -rw-r--r-- 1.3 KB
.hgeol -rw-r--r-- 1.0 KB
.hgignore -rw-r--r-- 1.3 KB
.hgtags -rw-r--r-- 8.7 KB
.travis.yml -rw-r--r-- 5.0 KB
LICENSE -rw-r--r-- 12.5 KB
Makefile.pre.in -rw-r--r-- 59.7 KB
README.rst -rw-r--r-- 9.1 KB
aclocal.m4 -rw-r--r-- 13.0 KB
config.guess -rwxr-xr-x 43.2 KB
config.sub -rwxr-xr-x 35.7 KB
configure -rwxr-xr-x 478.4 KB
configure.ac -rw-r--r-- 159.0 KB
install-sh -rwxr-xr-x 7.0 KB
pyconfig.h.in -rw-r--r-- 41.2 KB
setup.py -rw-r--r-- 102.0 KB

README.rst

back to top