Commit a2c9a98a authored by Andrew M. Kuchling's avatar Andrew M. Kuchling

[Bug #897935] Fix fd leak in pty.spawn(). Reported by James Henstridge; 2.3 bugfix candidate.

parent b7d8ce02
......@@ -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)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment