Ignore BlockingIOError when trying to write pty master fd

This commit is contained in:
WHR
2023-09-12 04:49:31 +00:00
parent a0cc9cba36
commit e27f48bcff

View File

@@ -158,8 +158,11 @@ def record(
handle_resize()
if pty_fd in wfds:
try:
n = os.write(pty_fd, input_data)
input_data = input_data[n:]
except BlockingIOError:
pass
pid, pty_fd = pty.fork()