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

fix hang in subprocess.Popen / subprocess.wait() #136

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fishpepper
Copy link

@fishpepper fishpepper commented Dec 20, 2016

I experienced hangs when running the wrapper on projects with huge stylecheck errors.
The python doc (https://docs.python.org/2/library/subprocess.html#subprocess.Popen) has the following snippet concerning calling wait() on the subprocess object:

Warning
This will deadlock when using stdout=PIPE and/or stderr=PIPE and the child process generates enough output to a pipe such that it blocks waiting for the OS pipe buffer to accept more data. Use communicate() to avoid that.

My patch fixes this deadlock by using a temporary file object for storage/data passing


 

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.

1 participant