From e78e7b3fec0b3d2342787aa82741e76ff04decfa Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sun, 15 Nov 2026 00:37:29 +0900 Subject: [PATCH] refac --- open_terminal/desktop_wayland.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/open_terminal/desktop_wayland.py b/open_terminal/desktop_wayland.py index 8d65b03..182c267 100644 --- a/open_terminal/desktop_wayland.py +++ b/open_terminal/desktop_wayland.py @@ -182,6 +182,8 @@ class WaylandDesktop(PortalDesktop): await self.invoke(REMOTE, self.session, REMOTE + ".Session", "Stop") async def stop_process(self, process): + if process.returncode is not None: + return # Services can spawn D-Bus-activated apps in the same owned process group. for sig in (signal.SIGTERM, signal.SIGKILL): with contextlib.suppress(ProcessLookupError):