mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
[Bug #897935] Fix fd leak in pty.spawn(). Reported by James Henstridge; 2.3 bugfix candidate.
This commit is contained in:
parent
b7d8ce0275
commit
a2c9a98a0a
1 changed files with 2 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue