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 1RxRz1-0004U3-C5 for garchives@archives.gentoo.org; Tue, 14 Feb 2012 23:40:27 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C8BBEE0B98; Tue, 14 Feb 2012 23:40:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 9D6ACE0B98 for ; Tue, 14 Feb 2012 23:40:17 +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 065441B4017 for ; Tue, 14 Feb 2012 23:40:17 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id BA31BE5400 for ; Tue, 14 Feb 2012 23:40:15 +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: <1329262797.11937db0fb2e25a30d855b084417f8d52547ff54.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/, pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/EbuildFetcher.py pym/portage/dbapi/_MergeProcess.py X-VCS-Directories: pym/portage/dbapi/ pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 11937db0fb2e25a30d855b084417f8d52547ff54 X-VCS-Branch: master Date: Tue, 14 Feb 2012 23:40:15 +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: 75b8aa47-fa18-4440-8335-67847029397a X-Archives-Hash: abe75eb599a5e19ac468edb237af094d commit: 11937db0fb2e25a30d855b084417f8d52547ff54 Author: Zac Medico gentoo org> AuthorDate: Tue Feb 14 23:39:57 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Feb 14 23:39:57 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D11937db0 Assert that fork returns int for bug 403697. These cases should have been included with commit 6a94a074aa0475173a51f3f726377d4c407e986b. --- pym/_emerge/EbuildFetcher.py | 3 +++ pym/portage/dbapi/_MergeProcess.py | 4 ++++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/pym/_emerge/EbuildFetcher.py b/pym/_emerge/EbuildFetcher.py index 6ad4341..c0175b3 100644 --- a/pym/_emerge/EbuildFetcher.py +++ b/pym/_emerge/EbuildFetcher.py @@ -164,6 +164,9 @@ class EbuildFetcher(SpawnProcess): =20 pid =3D os.fork() if pid !=3D 0: + if not isinstance(pid, int): + raise AssertionError( + "fork returned non-integer: %s" % (repr(pid),)) portage.process.spawned_pids.append(pid) return [pid] =20 diff --git a/pym/portage/dbapi/_MergeProcess.py b/pym/portage/dbapi/_Merg= eProcess.py index cf59265..1747a09 100644 --- a/pym/portage/dbapi/_MergeProcess.py +++ b/pym/portage/dbapi/_MergeProcess.py @@ -129,6 +129,10 @@ class MergeProcess(SpawnProcess): =20 pid =3D os.fork() if pid !=3D 0: + if not isinstance(pid, int): + raise AssertionError( + "fork returned non-integer: %s" % (repr(pid),)) + os.close(elog_writer_fd) self._elog_reader_fd =3D elog_reader_fd self._buf =3D ""