Staging
v0.5.1
v0.5.1
https://github.com/python/cpython
Revision 9c4a63fc17efea31ad41f90d28825be37469e0e2 authored by Miss Islington (bot) on 11 September 2018, 04:36:20 UTC, committed by Gregory P. Smith on 11 September 2018, 04:36:20 UTC
When subprocess.Popen() stdin= stdout= or stderr= handles are specified and appear in pass_fds=, don't close the original fds after dup'ing them. This implementation and unittest primarily came from @izbyshev (see the PR) See also https://github.com/izbyshev/cpython/commit/b89b52f28490b69142d5c061604b3a3989cec66c This also removes the old manual p2cread, c2pwrite, and errwrite closing logic as inheritable flags and _close_open_fds takes care of that properly today without special treatment. This code is within child_exec() where it is the only thread so there is no race condition between the dup and _Py_set_inheritable_async_safe call. (cherry picked from commit ce34410b8b67f49d8275c05d51b3ead50cf97f48) Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
1 parent 6df2005
Tip revision: 9c4a63fc17efea31ad41f90d28825be37469e0e2 authored by Miss Islington (bot) on 11 September 2018, 04:36:20 UTC
bpo-32270: Don't close stdin/out/err in pass_fds (GH-6242) (GH-9148)
bpo-32270: Don't close stdin/out/err in pass_fds (GH-6242) (GH-9148)
Tip revision: 9c4a63f
File | Mode | Size |
---|---|---|
.github | ||
.vsts | ||
Doc | ||
Grammar | ||
Include | ||
Lib | ||
Mac | ||
Misc | ||
Modules | ||
Objects | ||
PC | ||
PCbuild | ||
Parser | ||
Programs | ||
Python | ||
Tools | ||
m4 | ||
.gitattributes | -rw-r--r-- | 1.5 KB |
.gitignore | -rw-r--r-- | 1.5 KB |
.travis.yml | -rw-r--r-- | 6.0 KB |
CODE_OF_CONDUCT.rst | -rw-r--r-- | 631 bytes |
LICENSE | -rw-r--r-- | 12.5 KB |
Makefile.pre.in | -rw-r--r-- | 61.1 KB |
README.rst | -rw-r--r-- | 10.4 KB |
aclocal.m4 | -rw-r--r-- | 10.7 KB |
config.guess | -rwxr-xr-x | 43.1 KB |
config.sub | -rwxr-xr-x | 35.4 KB |
configure | -rwxr-xr-x | 484.6 KB |
configure.ac | -rw-r--r-- | 161.4 KB |
install-sh | -rwxr-xr-x | 7.0 KB |
pyconfig.h.in | -rw-r--r-- | 42.1 KB |
setup.py | -rw-r--r-- | 99.5 KB |
Computing file changes ...