guide: keep serving when stdout is closed #43

Merged
jcoffey-dev merged 1 commits from fix/guide-stdout into main 2026-10-30 21:01:00 +00:00
Owner

The v27.1-rc.5 tag build failed in mock_guide, so no release was published. The test helper read the address line and dropped the pipe; if that happened before the guide printed its second line, println! panicked on the broken pipe and the guide died, so the next request got a connection reset. The race is why #41 passed CI. A pipe into head would have done the same to someone running it.

  • The guide ignores write errors on its stdout.
  • The test helper keeps its end of the pipe open.
  • New test a_closed_stdout_doesnt_end_the_guide starts the guide with stdout already closed. It fails on the old code and passes now. mock_guide passed five runs in a row.
The v27.1-rc.5 tag build failed in `mock_guide`, so no release was published. The test helper read the address line and dropped the pipe; if that happened before the guide printed its second line, `println!` panicked on the broken pipe and the guide died, so the next request got a connection reset. The race is why #41 passed CI. A pipe into `head` would have done the same to someone running it. - The guide ignores write errors on its stdout. - The test helper keeps its end of the pipe open. - New test `a_closed_stdout_doesnt_end_the_guide` starts the guide with stdout already closed. It fails on the old code and passes now. `mock_guide` passed five runs in a row.
jcoffey-dev added 1 commit 2026-10-30 20:57:22 +00:00
guide: keep serving when stdout is closed
ci / test (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 3m11s
ci / announce (pull_request) Skipped
7b80a8380e
println! panics on a closed stdout, so a guide whose output went to a
reader that had stopped (the test helper, or a pipe into head) died after
printing its address. It now ignores write errors on stdout, and the
test helper keeps its end open. A new test starts the guide with stdout
already closed; it failed before this change.

This failed the v27.1-rc.5 tag build.
jcoffey-dev merged commit ce31736a4a into main 2026-10-30 21:01:00 +00:00
jcoffey-dev deleted branch fix/guide-stdout 2026-10-30 21:01:00 +00:00
Sign in to join this conversation.