diff options
Diffstat (limited to 'Lib/pty.py')
-rw-r--r-- | Lib/pty.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/pty.py b/Lib/pty.py index 889113c3dd..9fd4709427 100644 --- a/Lib/pty.py +++ b/Lib/pty.py @@ -121,6 +121,8 @@ def fork(): # Explicitly open the tty to make it become a controlling tty. tmp_fd = os.open(os.ttyname(STDOUT_FILENO), os.O_RDWR) os.close(tmp_fd) + else: + os.close(slave_fd) # Parent and child process. return pid, master_fd |