Skip to content

Fix tee write error diagnostics (F58, F59, F60)#25

Open
kelp wants to merge 1 commit intomainfrom
fix-tee-write-error-diagnostics
Open

Fix tee write error diagnostics (F58, F59, F60)#25
kelp wants to merge 1 commit intomainfrom
fix-tee-write-error-diagnostics

Conversation

@kelp
Copy link
Copy Markdown
Owner

@kelp kelp commented Mar 31, 2026

Summary

  • F58: Always print write error diagnostics, not just with -p. GNU tee reports write errors in all modes.
  • F59: Without -p, exit on broken stdout pipe (matches GNU default SIGPIPE behavior). With -p, continue writing to files after stdout breaks.
  • F60: Include filename in error messages and use POSIX error strings instead of Zig error names. e.g. tee: /dev/full: No space left on device instead of tee: write error: WriteError.

Test plan

  • All 93 tee integration tests pass (just it-util tee)
  • All unit tests pass (zig build test)
  • Code formatted (just fmt)

- Always report write errors with filename and POSIX error
  string, not just when -p is set (F58)
- Include filename in error messages like GNU tee:
  "tee: /dev/full: No space left on device" (F60)
- Use POSIX error strings instead of Zig error names (F60)
- Without -p, exit on broken stdout pipe matching GNU
  default SIGPIPE behavior (F59)
- With -p, continue writing to files after stdout breaks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant