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

Fixes on cmd.py (fd leak and signal exception) #58

Merged
merged 2 commits into from
May 8, 2012

Conversation

sugi
Copy link
Contributor

@sugi sugi commented May 8, 2012

Hello,

I found some problems on cmd.py and tried to write fixes.
Please consider to merge.

Fix fd leak on git cmd.

Currently if command is called with as_proces=True, pipes for the
command will not be closed.

cb68f36 makes sure to close command file descriptors.

Ignore signal exception on AutoInterrupt destructor.

When command run as subprocess, AutoInterrupt will kill the
process on destructor. However, if process already finished,
it raise OSError exception.

f467834 fix just ignore OSError on os.kill.

sugi added 2 commits May 8, 2012 09:18
Currently if command is called with as_proces=True, pipes for the
command will not be closed.

This change makes sure to close command file descriptors.
When command run as subprocess, AutoInterrupt will kill the
process on destructor. However, if process already finished,
it raise OSError exception.

This fix just ignore OSError on os.kill.
@Byron
Copy link
Member

Byron commented May 8, 2012

Thank you for fixing this - this one is a critical issue !

@Byron
Copy link
Member

Byron commented May 8, 2012

Please note that I am merging it into master, which is the latest development stream for the upcoming 0.4 release. This means that 0.3 branches would need a backport. In this case, it would be easy to do though.

Byron added a commit that referenced this pull request May 8, 2012
Fixes on cmd.py (fd leak and signal exception)

Currently if command is called with as_proces=True, pipes for the
command will not be closed.

cb68f36 makes sure to close command file descriptors.
Ignore signal exception on AutoInterrupt destructor.

When command run as subprocess, AutoInterrupt will kill the
process on destructor. However, if process already finished,
it raise OSError exception.
@Byron Byron merged commit 95878d2 into gitpython-developers:master May 8, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants