From 0ee5eccb32b4c5d41f9dab145108effc8b1ad353 Mon Sep 17 00:00:00 2001 From: Loren Eteval Date: Wed, 19 Aug 2026 08:44:31 +0800 Subject: [PATCH] Bound forced external-core shutdown Signed-off-by: Loren Eteval --- Furious/Backends/ExternalCore/Process.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Furious/Backends/ExternalCore/Process.py b/Furious/Backends/ExternalCore/Process.py index 0eb926b..4104259 100644 --- a/Furious/Backends/ExternalCore/Process.py +++ b/Furious/Backends/ExternalCore/Process.py @@ -42,7 +42,7 @@ class ExternalCoreProcess(RuntimeKernel): """Manage one direct external process and its output-reader threads.""" StartupObservationTimeout = 0.25 - ForcedShutdownTimeout = 3.0 + ForcedShutdownTimeout = 5.0 MaximumPendingOutput = 65536 def __init__(self, *, exitCallback=None, msgCallback=None): @@ -385,7 +385,10 @@ class ExternalCoreProcess(RuntimeKernel): stderr=subprocess.DEVNULL, check=False, shell=False, + timeout=ExternalCoreProcess.ForcedShutdownTimeout, ) + except subprocess.TimeoutExpired: + logger.warning('Windows process-tree shutdown command timed out') except OSError as ex: logger.warning(f'could not invoke Windows process-tree shutdown: {ex}')