Remember to close file descriptors before returning early from can_poll_pty().
authorZac Medico <zmedico@gentoo.org>
Sat, 12 Jul 2008 22:54:35 +0000 (22:54 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 12 Jul 2008 22:54:35 +0000 (22:54 -0000)
svn path=/main/trunk/; revision=11028

pym/_emerge/__init__.py

index e22ffd4550169d99d7676cb0a99e696aa04a2cf2..b13733fa4f83534040346cc4982e211d11af21fd 100644 (file)
@@ -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