aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2020-02-29 10:49:48 -0800
committerZac Medico <zmedico@gentoo.org>2020-02-29 10:50:28 -0800
commit10cc6febb701cde8f7c099f5ecdf177486e94b3c (patch)
treed23b9ba2df771629928051c8fc344433afc5685e
parentSpawnProcess: add _main coroutine (diff)
downloadportage-10cc6febb701cde8f7c099f5ecdf177486e94b3c.tar.gz
portage-10cc6febb701cde8f7c099f5ecdf177486e94b3c.tar.bz2
portage-10cc6febb701cde8f7c099f5ecdf177486e94b3c.zip
SpawnProcess: only cancel self._main_task if it's not done
Signed-off-by: Zac Medico <zmedico@gentoo.org>
-rw-r--r--lib/_emerge/SpawnProcess.py2
1 files changed, 1 insertions, 1 deletions
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):