Skip to content

Merged fd leaks fix from the master to the 0.3 version #150

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

Merged
merged 2 commits into from
Nov 14, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
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.

This fix just ignore OSError on os.kill.

Conflicts:
	git/cmd.py
  • Loading branch information
sugi authored and derenio committed Mar 31, 2014
commit b137f55232155b16aa308ec4ea8d6bc994268b0d
2 changes: 2 additions & 0 deletions git/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ def __del__(self):
# try to kill it
try:
os.kill(self.proc.pid, 2) # interrupt signal
except OSError:
pass # ignore error when process already died
except AttributeError:
# try windows
# for some reason, providing None for stdout/stderr still prints something. This is why
Expand Down