mirror of
https://github.com/tailscale/tailscale.git
synced 2026-02-27 18:42:30 +01:00
Fixes a race where CloseWrite() could be called before Exit(), causing SSH clients (especially on macOS) to miss the exit status. Simplified run() to use sync.WaitGroup and guarantee Exit() is sent before EOF per RFC 4254 section 6.10. Also: - Send SIGHUP instead of SIGKILL on session termination - Use exit code 127 for command not found - Use exit code 255 for SSH permission/protocol errors - Use exit code 254 for recording failures - Complete TCP handlers only after I/O completes Fixes tailscale/tailscale#18256 Signed-off-by: James Tucker <james@tailscale.com>