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

Hang when output file size exceeds OS pipe buffer size #4

Open
ssokolow opened this issue Dec 20, 2014 · 0 comments
Open

Hang when output file size exceeds OS pipe buffer size #4

ssokolow opened this issue Dec 20, 2014 · 0 comments

Comments

@ssokolow
Copy link

Basically, you're tripping over this warning from the Python manual:

Warning: Use communicate() rather than stdin.write(), stdout.read() or stderr.read() to avoid deadlocks due to any of the other OS pipe buffers filling up and blocking the child process.

...though I also noticed that you were making a couple of other mistakes in your use of subprocess:

Warning: Passing shell=True can be a security hazard if combined with untrusted input. See the warning under Frequently Used Arguments for details.

Note that on Windows, you cannot set close_fds to true and also redirect the standard handles by setting stdin, stdout or stderr.

I have a fix (plus some code cleanups) ready to submit but, with no license specified, I'm wary of submitting a pull request where the world can see and use my changes.

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

No branches or pull requests

1 participant