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

Possible leaking of subprocess PIPE #103

Open
fuzzball81 opened this issue Feb 16, 2017 · 3 comments
Open

Possible leaking of subprocess PIPE #103

fuzzball81 opened this issue Feb 16, 2017 · 3 comments

Comments

@fuzzball81
Copy link
Contributor

In utils.cmd.run (utils/cmd.py) several subprocess.PIPE instances are spawned and never closed, which can cause a leak.

@fuzzball81
Copy link
Contributor Author

I would suggest using a finally clause as part of the try... except to ensure they are always cleaned up in either a good or failing case.

@fuzzball81
Copy link
Contributor Author

May also want to investigate using subprocess.check_call or subprocess.check_output in place of using subprocess.Popen. This will remove the need for the pipes.

@yac
Copy link
Contributor

yac commented Feb 22, 2017

I'd expect the python interpreter to close them automatically on garbage collection, but you might be right.

I see this as a low priority before 1.0 - please feel free to submit a fix :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants