]> granicus.if.org Git - python/commitdiff
[Bug #897935] Fix fd leak in pty.spawn(). Reported by James Henstridge; 2.3 bugfix...
authorAndrew M. Kuchling <amk@amk.ca>
Sat, 5 Jun 2004 16:27:16 +0000 (16:27 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Sat, 5 Jun 2004 16:27:16 +0000 (16:27 +0000)
Lib/pty.py

index a70a865dc36188d614d7940417d9b7ca884293c1..cafbc9c962d15b7e9eea0fd14346ed4a3fe44cf1 100644 (file)
@@ -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)