mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-06 09:20:57 +01:00
safely close handles
This commit is contained in:
parent
45edaa62f2
commit
773e03d6c7
1 changed files with 2 additions and 2 deletions
|
@ -606,8 +606,8 @@ class PopenThread(threading.Thread):
|
|||
if self.suspended:
|
||||
return
|
||||
# close files to send EOF to non-blocking reader.
|
||||
self.orig_stdout.close()
|
||||
self.orig_stderr.close()
|
||||
safe_fdclose(self.orig_stdout)
|
||||
safe_fdclose(self.orig_stderr)
|
||||
# read in the remaining data in a blocking fashion.
|
||||
while not procout.is_fully_read() or not procerr.is_fully_read():
|
||||
self._read_write(procout, stdout, sys.__stdout__)
|
||||
|
|
Loading…
Add table
Reference in a new issue