88 def write(self, data): |
88 def write(self, data): |
89 return self._call('write', data) |
89 return self._call('write', data) |
90 |
90 |
91 def read(self, size): |
91 def read(self, size): |
92 r = self._call('read', size) |
92 r = self._call('read', size) |
|
93 if size != 0 and not r: |
|
94 # We've observed a condition that indicates the |
|
95 # stdout closed unexpectedly. Check stderr one |
|
96 # more time and snag anything that's there before |
|
97 # letting anyone know the main part of the pipe |
|
98 # closed prematurely. |
|
99 _forwardoutput(self._ui, self._side) |
|
100 return r |
|
101 |
|
102 def unbufferedread(self, size): |
|
103 r = self._call('unbufferedread', size) |
93 if size != 0 and not r: |
104 if size != 0 and not r: |
94 # We've observed a condition that indicates the |
105 # We've observed a condition that indicates the |
95 # stdout closed unexpectedly. Check stderr one |
106 # stdout closed unexpectedly. Check stderr one |
96 # more time and snag anything that's there before |
107 # more time and snag anything that's there before |
97 # letting anyone know the main part of the pipe |
108 # letting anyone know the main part of the pipe |