summaryrefslogtreecommitdiffstats
path: root/Tools/gdb/libpython.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-09-11 06:00:47 (GMT)
committerGregory P. Smith <greg@krypto.org>2018-09-11 06:00:47 (GMT)
commit2173bb818c6c726d831b106ed0d3fad7825905dc (patch)
tree80a9cfd2786272e44efcfc00b9184317635da970 /Tools/gdb/libpython.py
parentb2260e59ff1eaf20de4738099005ddf507b7b27d (diff)
downloadcpython-2173bb818c6c726d831b106ed0d3fad7825905dc.zip
cpython-2173bb818c6c726d831b106ed0d3fad7825905dc.tar.gz
cpython-2173bb818c6c726d831b106ed0d3fad7825905dc.tar.bz2
bpo-32270: Don't close stdin/out/err in pass_fds (GH-6242) (GH-9149)
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]
Diffstat (limited to 'Tools/gdb/libpython.py')
0 files changed, 0 insertions, 0 deletions