Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion hermes_cli/_subprocess_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,12 @@ def windows_hide_flags() -> int:
"""
if not IS_WINDOWS:
return 0
return _CREATE_NO_WINDOW
# _CREATE_BREAKAWAY_FROM_JOB is needed even for short-lived synchronous
# children: Electron/Tauri desktop apps wrap their subprocesses in job
# objects, and without breakaway a child started with capture_output=True
# can be killed when the parent Electron/Tauri process exits — even though
# DETACHED_PROCESS is not set and stdio is still connected.
return _CREATE_NO_WINDOW | _CREATE_BREAKAWAY_FROM_JOB

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CREATE_BREAKAWAY_FROM_JOB can make CreateProcess fail when the parent job disallows breakaway; current main documents this at hermes_cli/_subprocess_compat.py:138-144. Because this helper is used by synchronous callers without an OSError retry (for example tools/environments/base.py:145-153), please avoid applying this bit globally unless the fallback is designed and covered.



def windows_detach_popen_kwargs() -> dict:
Expand Down
Loading