commit: 10cc6febb701cde8f7c099f5ecdf177486e94b3c
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 29 18:49:48 2020 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Feb 29 18:50:28 2020 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=10cc6feb
SpawnProcess: only cancel self._main_task if it's not done
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
lib/_emerge/SpawnProcess.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/_emerge/SpawnProcess.py b/lib/_emerge/SpawnProcess.py
index cda615ded..aef000e22 100644
--- a/lib/_emerge/SpawnProcess.py
+++ b/lib/_emerge/SpawnProcess.py
@@ -196,7 +196,7 @@ class SpawnProcess(SubProcess):
def _cancel(self):
SubProcess._cancel(self)
if self._main_task is not None:
- self._main_task.cancel()
+ self._main_task.done() or self._main_task.cancel()
self._cgroup_cleanup()
def _cgroup_cleanup(self):