From 2d1fa83d583c0d3196a3840163fcc75e9d163c2e Mon Sep 17 00:00:00 2001 From: david kifer Date: Tue, 30 Jun 2026 10:05:44 -0400 Subject: [PATCH] Fix zombie upscaler processes by killing child processes and upscaler binaries in stop.py --- stop.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/stop.py b/stop.py index 56c2846..aeafedc 100755 --- a/stop.py +++ b/stop.py @@ -56,6 +56,18 @@ def stop() -> None: print(f"🛑 Stopping server (PID {pid}) …") + # Clean up child processes of the server and any lingering upscaler binaries + import subprocess + try: + subprocess.run(["pkill", "-P", str(pid)], capture_output=True) + except Exception: + pass + try: + subprocess.run(["pkill", "-f", "realesrgan-ncnn-vulkan"], capture_output=True) + subprocess.run(["pkill", "-f", "rife-ncnn-vulkan"], capture_output=True) + except Exception: + pass + # Graceful shutdown (SIGTERM) os.kill(pid, signal.SIGTERM)