From a2c9a98a0a43a7a0bd8d4d35a03f486acb92453e Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Sat, 5 Jun 2004 16:27:16 +0000 Subject: [Bug #897935] Fix fd leak in pty.spawn(). Reported by James Henstridge; 2.3 bugfix candidate. --- Lib/pty.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/pty.py b/Lib/pty.py index a70a865..cafbc9c 100644 --- a/Lib/pty.py +++ b/Lib/pty.py @@ -175,3 +175,5 @@ def spawn(argv, master_read=_read, stdin_read=_read): except (IOError, OSError): if restore: tty.tcsetattr(STDIN_FILENO, tty.TCSAFLUSH, mode) + + os.close(master_fd) -- cgit v0.12