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

This commit is contained in:
Andrew M. Kuchling 2004-06-05 16:27:16 +00:00
parent b7d8ce0275
commit a2c9a98a0a

View 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)