From: Zac Medico Date: Sat, 12 Jul 2008 22:54:35 +0000 (-0000) Subject: Remember to close file descriptors before returning early from can_poll_pty(). X-Git-Tag: v2.2_rc2~117 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3c09a9a10307ecc23287cc0cb4b5725b9050b936;p=portage.git Remember to close file descriptors before returning early from can_poll_pty(). svn path=/main/trunk/; revision=11028 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index e22ffd455..b13733fa4 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -7896,6 +7896,8 @@ def can_poll_pty(): got_pty, master_fd, slave_fd = \ portage._create_pty_or_pipe(copy_term_size=sys.stdout.fileno()) if not got_pty: + os.close(master_fd) + os.close(slave_fd) _can_poll_pty = False return _can_poll_pty