Show More
@@ -8,6 +8,7 b'' | |||
|
8 | 8 | from __future__ import absolute_import |
|
9 | 9 | |
|
10 | 10 | import contextlib |
|
11 | import errno | |
|
11 | 12 | import os |
|
12 | 13 | import sys |
|
13 | 14 | |
@@ -289,10 +290,18 b' def redirect_stdio():' | |||
|
289 | 290 | # The stderr is fully buffered on Windows when connected to a pipe. |
|
290 | 291 | # A forcible flush is required to make small stderr data in the |
|
291 | 292 | # remote side available to the client immediately. |
|
292 | procutil.stderr.flush() | |
|
293 | try: | |
|
294 | procutil.stderr.flush() | |
|
295 | except IOError as err: | |
|
296 | if err.errno not in (errno.EPIPE, errno.EIO, errno.EBADF): | |
|
297 | raise error.StdioError(err) | |
|
293 | 298 | |
|
294 | 299 | if _redirect and oldstdout >= 0: |
|
295 | procutil.stdout.flush() # write hook output to stderr fd | |
|
300 | try: | |
|
301 | procutil.stdout.flush() # write hook output to stderr fd | |
|
302 | except IOError as err: | |
|
303 | if err.errno not in (errno.EPIPE, errno.EIO, errno.EBADF): | |
|
304 | raise error.StdioError(err) | |
|
296 | 305 | os.dup2(oldstdout, stdoutno) |
|
297 | 306 | os.close(oldstdout) |
|
298 | 307 |
General Comments 0
You need to be logged in to leave comments.
Login now