FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fixes on cmd.py (fd leak and signal exception) by sugi · Pull Request #58 · gitpython-developers/GitPython · GitHub

Repository navigation

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

Merged
Byron merged 2 commits into
gitpython-developers:masterfrom
sugi:cmd-fd-leak-fix
May 8, 2012
Merged

Byron merged 2 commits into
gitpython-developers:masterfrom
sugi:cmd-fd-leak-fix

Conversation

sugi commented May 8, 2012

Copy link
Copy Markdown
Contributor

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 commented May 8, 2012

Copy link
Copy Markdown
Member

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

Byron commented May 8, 2012

Copy link
Copy Markdown
Member

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 merged commit 95878d2 into gitpython-developers:master May 8, 2012
govtech42 pushed a commit to mirror81/GitPython that referenced this pull request Jul 25, 2026
Test Python 3.7 on Ubuntu 22.04, and add Ubuntu 3.13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL