mirror of
https://github.com/tailscale/tailscale.git
synced 2026-09-13 14:29:49 -04:00
The previous commit sent CHANNEL_EOF from the stdout copier as soon as stdout hit EOF. With the process exited and the send window exhausted by a slow client, the stderr copier could still be draining its backlog; x/crypto/ssh fails every write after EOF (WriteExtended checks sentEOF), so the tail of stderr was silently dropped. Send CloseWrite from run() itself, after cmd.Wait, exit-status and both output copiers have finished. Wire order is unchanged: exit-status, remaining output, EOF, CHANNEL_CLOSE. The test withholds stderr window credit until the process has exited server-side, then releases it and checks the final bytes arrived. It also pins the harness login shell to /bin/sh; fish forks -c commands and stays resident, changing pipe fd ownership under test. Updates #18256 Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>