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
12 changes: 6 additions & 6 deletions hermes_cli/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -1361,11 +1361,11 @@ def generate_launchd_plist() -> str:
<true/>

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

<key>ThrottleInterval</key>
<integer>5</integer>

<key>StandardOutPath</key>
<string>{log_dir}/gateway.log</string>

Expand Down Expand Up @@ -1474,7 +1474,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.
# immediately restarts it because KeepAlive is 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