Lest I forget: the master fd created here:
|
(out_master, fd_out) = pty.openpty() |
Is leaked to the spawned child here:
|
(process, exit_code, timed_out, output) = RunProcess( |
|
context, |
|
timeout, |
|
args = args, |
|
stdin = fd_in, |
|
stdout = fd_out, |
|
stderr = fd_err, |
|
env = env_copy, |
|
faketty = faketty, |
|
pty_out = pty_out, |
|
preexec_fn = preexec_fn |
|
) |
Fix: the preexec_fn should os.close(pty_out).