From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RxpAl-0005uN-LR for garchives@archives.gentoo.org; Thu, 16 Feb 2012 00:26:07 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 528FEE096E; Thu, 16 Feb 2012 00:26:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 1DA76E096E for ; Thu, 16 Feb 2012 00:26:00 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 427011B4016 for ; Thu, 16 Feb 2012 00:25:58 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id ECB02E5400 for ; Thu, 16 Feb 2012 00:25:56 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1329351931.4862a0c5627e13cb3618779b41ef0fe0edae148b.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/SpawnProcess.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 4862a0c5627e13cb3618779b41ef0fe0edae148b X-VCS-Branch: master Date: Thu, 16 Feb 2012 00:25:56 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: a1c863ce-97b1-4d23-a12b-e94f048fac3f X-Archives-Hash: 22790ef021d058dccd52c3e743787eb3 commit: 4862a0c5627e13cb3618779b41ef0fe0edae148b Author: Zac Medico gentoo org> AuthorDate: Thu Feb 16 00:25:31 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Feb 16 00:25:31 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D4862a0c5 SpawnProcess: use os.open for /dev/null input --- pym/_emerge/SpawnProcess.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pym/_emerge/SpawnProcess.py b/pym/_emerge/SpawnProcess.py index 05c4768..9fbc964 100644 --- a/pym/_emerge/SpawnProcess.py +++ b/pym/_emerge/SpawnProcess.py @@ -59,8 +59,8 @@ class SpawnProcess(SubProcess): # access to stdin. Until then, use /dev/null so that any # attempts to read from stdin will immediately return EOF # instead of blocking indefinitely. - null_input =3D open('/dev/null', 'rb') - fd_pipes[0] =3D null_input.fileno() + null_input =3D os.open('/dev/null', os.O_RDWR) + fd_pipes[0] =3D null_input =20 fd_pipes.setdefault(0, sys.stdin.fileno()) fd_pipes.setdefault(1, sys.stdout.fileno()) @@ -123,7 +123,7 @@ class SpawnProcess(SubProcess): =20 os.close(slave_fd) if null_input is not None: - null_input.close() + os.close(null_input) =20 if isinstance(retval, int): # spawn failed