diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ce28a00..adc1788f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ Status of the `main` branch. Changes prior to the next official version change w This allows the dashboard to display the configuration while the project provided at startup is still initialising. #1064 - Fix empty executions queue displaying "Loading..." - Tray manager: Add NixOS-support for AppIndicator-based trays (e.g., most Wayland-trays) to the package in flake.nix. + - Fix: Wait for the subprocess that opens the browser window, preventing zombie processes #1488 # v1.5.3 (2026-05-26) diff --git a/src/serena/dashboard.py b/src/serena/dashboard.py index 7b599f9c..cac54bc5 100644 --- a/src/serena/dashboard.py +++ b/src/serena/dashboard.py @@ -813,13 +813,14 @@ def open_url_in_browser(url: str, use_subprocess: bool = False) -> None: if use_subprocess: # Use a subprocess to avoid any output from webbrowser.open being written to stdout try: - subprocess.Popen( + p = subprocess.Popen( [sys.executable, "-c", f"import webbrowser; webbrowser.open({url!r})"], stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, start_new_session=False, ) + threading.Thread(target=p.wait, daemon=True).start() except Exception as e: # Subprocess creation can fail in rare cases (e.g. on some Linux systems; possibly subprocess/glibc bug) # See #1363