fix(gateway): use kickstart -k for atomic launchd restart
Replace the two-step stop/start restart with a single launchctl kickstart -k call. When the gateway triggers a restart from inside its own process tree, the old stop command kills the shell before the start half is reached. kickstart -k lets launchd handle the kill+restart atomically.
This commit is contained in:
@@ -297,7 +297,7 @@ class TestGatewaySystemServiceRouting:
|
||||
gateway_cli,
|
||||
"launchd_restart",
|
||||
lambda: (_ for _ in ()).throw(
|
||||
gateway_cli.subprocess.CalledProcessError(5, ["launchctl", "start", "ai.hermes.gateway"])
|
||||
gateway_cli.subprocess.CalledProcessError(5, ["launchctl", "kickstart", "-k", "gui/501/ai.hermes.gateway"])
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user