From d99091a3b48d91ac6247697f9acd1e26b5d5ec92 Mon Sep 17 00:00:00 2001 From: Evgeniy Alekseev Date: Mon, 29 May 2023 17:27:04 +0300 Subject: [PATCH] do not terminate child process explicitly This feature sometimes causes the main process termination. Since the child process has been already terminated (or going to) there is no need to terminate it manually --- src/ahriman/core/spawn.py | 1 - tests/ahriman/core/test_spawn.py | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/ahriman/core/spawn.py b/src/ahriman/core/spawn.py index abbd2d7f..e0e41ccb 100644 --- a/src/ahriman/core/spawn.py +++ b/src/ahriman/core/spawn.py @@ -172,7 +172,6 @@ class Spawn(Thread, LazyLogging): process = self.active.pop(process_id, None) if process is not None: - process.terminate() # make sure lol process.join() def stop(self) -> None: diff --git a/tests/ahriman/core/test_spawn.py b/tests/ahriman/core/test_spawn.py index 98f2cabc..1b2366e9 100644 --- a/tests/ahriman/core/test_spawn.py +++ b/tests/ahriman/core/test_spawn.py @@ -140,9 +140,7 @@ def test_run_pop(spawner: Spawn) -> None: spawner.run() - first.terminate.assert_called_once_with() first.join.assert_called_once_with() - second.terminate.assert_called_once_with() second.join.assert_called_once_with() assert not spawner.active