a3d3daf7e9
gateway_declares_external_supervisor treated the control-socket identify answer as final whenever `supervisor` was non-empty and only accepted "external". _detect_supervisor() answers "systemd" as soon as INVOCATION_ID is set (and "launchd" under the XPC name), so a gateway run by a custom, non-canonical systemd unit / launchd agent with `ExecStart=... gateway run --external-supervisor` — the documented contract — was classified non-external and `hermes gateway restart` still took the stop + foreground run_gateway path that stamps the CLI's PID and wedges every respawn (#110637). The update path's argv check on the same gateway already said external-supervisor, so the two restart paths disagreed. Any self-declared supervisor other than "manual" now means hand back (the declaring supervisor owns the respawn); otherwise the argv/state-file marker decides as before. The drain-failure message no longer claims a timeout when SIGUSR1 could not be sent at all. Review finding: socket-first detection classified a custom systemd unit's --external-supervisor gateway as manual and took the wedge path.