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: 2 additions & 5 deletions hermes_cli/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -1086,10 +1086,7 @@ def generate_launchd_plist() -> str:
<true/>

<key>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
<false/>
</dict>
<true/>

<key>StandardOutPath</key>
<string>{log_dir}/gateway.log</string>
Expand Down Expand Up @@ -1199,7 +1196,7 @@ def launchd_stop():
target = f"{_launchd_domain()}/{label}"
# bootout unloads the service definition so KeepAlive doesn't respawn
# the process. A plain `kill SIGTERM` only signals the process — launchd
# immediately restarts it because KeepAlive.SuccessfulExit = false.
# would immediately restart it because KeepAlive is now unconditional.
# `hermes gateway start` re-bootstraps when it detects the job is unloaded.
try:
subprocess.run(["launchctl", "bootout", target], check=True, timeout=90)
Expand Down