Skip to content
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

Use Popen.communicate() instead of Popen.wait() #1689

Merged
merged 1 commit into from
Jan 5, 2019

Conversation

Baisang
Copy link
Contributor

@Baisang Baisang commented Jan 5, 2019

Popen objects may deadlock when using stdout=PIPE or stderr=PIPE
with Popen.wait(). Using Popen.communicate() avoids the issue.

I ran into this issue in a fork. This code should behave the same but avoids the possibility of deadlock described here: https://docs.python.org/2/library/subprocess.html#subprocess.Popen.wait


This change is Reviewable

Popen objects may deadlock when using stdout=PIPE or stderr=PIPE
with Popen.wait(). Using Popen.communicate() avoids the issue.
Copy link
Collaborator

@jeffwidman jeffwidman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thank you!

@jeffwidman jeffwidman merged commit d2f9413 into dpkp:master Jan 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants