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 1RbdIw-0004ld-LS for garchives@archives.gentoo.org; Fri, 16 Dec 2011 19:18:50 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7A23E21C096; Fri, 16 Dec 2011 19:18:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 4BC0621C096 for ; Fri, 16 Dec 2011 19:18:32 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B538C1B4037 for ; Fri, 16 Dec 2011 19:18:31 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 2A3D28004A for ; Fri, 16 Dec 2011 19:18:31 +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: 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: f75fc7375ea902da2e96825ca27c8b7f5031a491 Date: Fri, 16 Dec 2011 19:18:31 +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: 183171db-6655-499b-a70b-f92663e7efba X-Archives-Hash: 2c14c6db25f5e3357766561aa9fea435 commit: f75fc7375ea902da2e96825ca27c8b7f5031a491 Author: Zac Medico gentoo org> AuthorDate: Fri Dec 16 19:18:20 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Dec 16 19:18:20 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Df75fc737 SpawnProcess: remove obsolete fdopen Since commit 30d2d0a9db486c5a70848ad5d27b37a3ec48f271, we use os.read() due to bugs in array.fromfile(), so there's no need to use fdopen. --- pym/_emerge/SpawnProcess.py | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pym/_emerge/SpawnProcess.py b/pym/_emerge/SpawnProcess.py index c2f4928..9f83ef0 100644 --- a/pym/_emerge/SpawnProcess.py +++ b/pym/_emerge/SpawnProcess.py @@ -46,6 +46,7 @@ class SpawnProcess(SubProcess): master_fd, slave_fd =3D self._pipe(fd_pipes) fcntl.fcntl(master_fd, fcntl.F_SETFL, fcntl.fcntl(master_fd, fcntl.F_GETFL) | os.O_NONBLOCK) + files.process =3D master_fd =20 logfile =3D None if self._can_log(slave_fd): @@ -75,9 +76,6 @@ class SpawnProcess(SubProcess): if fd =3D=3D sys.stderr.fileno(): sys.stderr.flush() =20 - # WARNING: It is very important to use unbuffered mode here, - # in order to avoid issue 5380 with python3. - files.process =3D os.fdopen(master_fd, 'rb', 0) if logfile is not None: =20 fd_pipes_orig =3D fd_pipes.copy() @@ -120,7 +118,7 @@ class SpawnProcess(SubProcess): kwargs["returnpid"] =3D True kwargs.pop("logfile", None) =20 - self._reg_id =3D self.scheduler.register(files.process.fileno(), + self._reg_id =3D self.scheduler.register(files.process, self._registered_events, output_handler) self._registered =3D True =20