summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2004-06-05 16:27:16 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2004-06-05 16:27:16 (GMT)
commita2c9a98a0a43a7a0bd8d4d35a03f486acb92453e (patch)
tree5328bf9ae360f419a72e38fce042d536be9f04e9
parentb7d8ce0275d7b4c9a9c2312d0add835c6eac1730 (diff)
downloadcpython-a2c9a98a0a43a7a0bd8d4d35a03f486acb92453e.zip
cpython-a2c9a98a0a43a7a0bd8d4d35a03f486acb92453e.tar.gz
cpython-a2c9a98a0a43a7a0bd8d4d35a03f486acb92453e.tar.bz2
[Bug #897935] Fix fd leak in pty.spawn(). Reported by James Henstridge; 2.3 bugfix candidate.
-rw-r--r--Lib/pty.py2
1 files changed, 2 insertions, 0 deletions
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)