]> granicus.if.org Git - python/commit
bpo-37424: Avoid a hang in subprocess.run timeout output capture (GH-14490)
authorGregory P. Smith <greg@krypto.org>
Wed, 11 Sep 2019 09:23:05 +0000 (04:23 -0500)
committerT. Wouters <thomas@python.org>
Wed, 11 Sep 2019 09:23:05 +0000 (02:23 -0700)
commit580d2782f70f8e0bed7ec20abb03d740cb83b5da
tree28962e4e84a383c7d5c79250d406a663bc3fa7c8
parent3fb1363fe87a24cdb2ee1dd9746f1c49046af958
bpo-37424: Avoid a hang in subprocess.run timeout output capture (GH-14490)

Fixes a possible hang when using a timeout on subprocess.run() while
capturing output. If the child process spawned its own children or otherwise
connected its stdout or stderr handles with another process, we could hang
after the timeout was reached and our child was killed when attempting to read
final output from the pipes.
Lib/subprocess.py
Lib/test/test_subprocess.py
Misc/NEWS.d/next/Library/2019-07-04-13-00-20.bpo-37424.0i1MR-.rst [new file with mode: 0644]