Skip to content

Commit

Permalink
SpawnProcess: only cancel self._main_task if it's not done
Browse files Browse the repository at this point in the history
Signed-off-by: Zac Medico <zmedico@gentoo.org>
  • Loading branch information
zmedico committed Feb 29, 2020
1 parent 8074127 commit 10cc6fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/_emerge/SpawnProcess.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def _unregister(self):
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):
Expand Down

0 comments on commit 10cc6fe

Please sign in to comment.