mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-10 06:16:40 +00:00
Fix: Wait for the subprocess that opens the browser window, preventing zombie processes
Fixes #1488
This commit is contained in:
1 parent
8a54795848
commit
02c3d6bb78
2 files changed
+3
-1
No files matched your search
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user