a1d7da4fec
The stdio listener serves exactly one connection: the process's own stdin/stdout, piped from a parent such as SSH ProxyCommand. When that connection ended, gost lingered forever. The service's accept loop runs in a fire-and-forget goroutine and the process blocks on go-svc's signal wait, so it never exited unless the parent sent a terminating signal. On macOS (darwin/arm64) the ProxyCommand child does not reliably receive that signal, so gost hung after ssh quit. Close the listener and call os.Exit when the stdio connection closes, making exit deterministic regardless of whether the parent signals it. Ref go-gost/gost#433.