From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C37551382C5 for ; Mon, 23 Apr 2018 01:03:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D8A98E0A43; Mon, 23 Apr 2018 01:03:43 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B6659E0A43 for ; Mon, 23 Apr 2018 01:03:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 553B6335C30 for ; Mon, 23 Apr 2018 01:03:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A324227F for ; Mon, 23 Apr 2018 01:03:40 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1524444555.3eb46b05eb098507ea74108559bf77006e0f8142.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/util/_async/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/util/_async/FileDigester.py X-VCS-Directories: pym/portage/util/_async/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 3eb46b05eb098507ea74108559bf77006e0f8142 X-VCS-Branch: master Date: Mon, 23 Apr 2018 01:03:40 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 3c2f4503-8855-4a70-8c9b-e5cee818388c X-Archives-Hash: b77f59d5c98d05e93ecdb66c55e720fd commit: 3eb46b05eb098507ea74108559bf77006e0f8142 Author: Zac Medico gentoo org> AuthorDate: Mon Apr 23 00:49:15 2018 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Apr 23 00:49:15 2018 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=3eb46b05 FileDigester: use _async_waitpid (bug 591760) When pid exit status is not yet available, use the Subprocess _async_waitpid() method to avoid event loop recursion. Bug: https://bugs.gentoo.org/591760 pym/portage/util/_async/FileDigester.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pym/portage/util/_async/FileDigester.py b/pym/portage/util/_async/FileDigester.py index 881c69280..72f06759c 100644 --- a/pym/portage/util/_async/FileDigester.py +++ b/pym/portage/util/_async/FileDigester.py @@ -60,8 +60,11 @@ class FileDigester(ForkProcess): def _digest_pipe_reader_exit(self, pipe_reader): self._parse_digests(pipe_reader.getvalue()) self._digest_pipe_reader = None - self._unregister() - self.wait() + if self.pid is None: + self._unregister() + self._async_wait() + else: + self._async_waitpid() def _unregister(self): ForkProcess._unregister(self)