Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2cc8f1e

Browse files
rikdevРябченко Иван Константинович
authored and
Рябченко Иван Константинович
committed
fix(cmd): fixed deadlock when stderr buffer overflow
Fixed deadlock when using stderr=PIPE in Popen and Git generates enoughoutput to a pipe such that it blocks waiting for the OS pipe buffer toaccept more data (seehttps://docs.python.org/2/library/subprocess.html#subprocess.Popen.wait)
1 parent51f79ff commit2cc8f1e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎git/cmd.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,11 +310,11 @@ def wait(self):
310310
"""Wait for the process and return its status code.
311311
312312
:raise GitCommandError: if the return status is not 0"""
313-
status=self.proc.wait()
314-
ifstatus!=0:
315-
raiseGitCommandError(self.args,status,self.proc.stderr.read())
313+
stderr_value=self.proc.communicate()[1]
314+
ifself.proc.returncode!=0:
315+
raiseGitCommandError(self.args,status,stderr_value)
316316
# END status handling
317-
returnstatus
317+
returnself.proc.returncode
318318
# END auto interrupt
319319

320320
classCatFileContentStream(object):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp