1 |
commit: 10cc6febb701cde8f7c099f5ecdf177486e94b3c |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Feb 29 18:49:48 2020 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 29 18:50:28 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=10cc6feb |
7 |
|
8 |
SpawnProcess: only cancel self._main_task if it's not done |
9 |
|
10 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
11 |
|
12 |
lib/_emerge/SpawnProcess.py | 2 +- |
13 |
1 file changed, 1 insertion(+), 1 deletion(-) |
14 |
|
15 |
diff --git a/lib/_emerge/SpawnProcess.py b/lib/_emerge/SpawnProcess.py |
16 |
index cda615ded..aef000e22 100644 |
17 |
--- a/lib/_emerge/SpawnProcess.py |
18 |
+++ b/lib/_emerge/SpawnProcess.py |
19 |
@@ -196,7 +196,7 @@ class SpawnProcess(SubProcess): |
20 |
def _cancel(self): |
21 |
SubProcess._cancel(self) |
22 |
if self._main_task is not None: |
23 |
- self._main_task.cancel() |
24 |
+ self._main_task.done() or self._main_task.cancel() |
25 |
self._cgroup_cleanup() |
26 |
|
27 |
def _cgroup_cleanup(self): |