Skip to content

[3.7] bpo-37424: Avoid a hang in subprocess.run timeout output capture (GH-14490) #15898

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 11, 2019

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Sep 11, 2019

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.
(cherry picked from commit 580d278)

Co-authored-by: Gregory P. Smith greg@krypto.org

https://bugs.python.org/issue37424

…honGH-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.
(cherry picked from commit 580d278)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
@miss-islington
Copy link
Contributor Author

@gpshead and @Yhg1s: Status check is done, and it's a success ✅ .

1 similar comment
@miss-islington
Copy link
Contributor Author

@gpshead and @Yhg1s: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 5fe153c into python:3.7 Sep 11, 2019
@miss-islington miss-islington deleted the backport-580d278-3.7 branch September 11, 2019 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants