Skip to content

Commit 5a79023

Browse files
committed
Fix endless while loop on EOF for pty process
os.read spec says that when EOF is reached by the fd, an empty bytes object is returned.
1 parent 5652e35 commit 5a79023

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: src/execution/process_pty.py

+2
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ def pipe_process_output(self):
7272
while True:
7373
try:
7474
chunk = os.read(self.pty_master, max_read_bytes)
75+
if not chunk:
76+
break
7577
data += chunk
7678

7779
except BlockingIOError:

0 commit comments

Comments
 (0)