Page MenuHomeFreeBSD

ncal: Error out if writing to stdout failed.
ClosedPublic

Authored by des on May 4 2023, 3:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 5, 6:45 PM
Unknown Object (File)
Sun, Oct 20, 11:55 PM
Unknown Object (File)
Oct 2 2024, 12:19 AM
Unknown Object (File)
Oct 1 2024, 10:40 PM
Unknown Object (File)
Sep 24 2024, 8:29 PM
Unknown Object (File)
Sep 24 2024, 3:24 PM
Unknown Object (File)
Sep 23 2024, 9:03 PM
Unknown Object (File)
Sep 23 2024, 4:33 AM
Subscribers

Details

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.May 4 2023, 4:33 PM
kevans added a subscriber: kevans.
In D39958#909666, @imp wrote:

seems ok, but why?

Yeah, suggest adding something like: "UNIX conformance requires command-line utilities to detect errors writing to stdout, emit an error message and exit accordingly."

Technically we could check every write, but that seems too invasive and not really any better than just catching it at the end.

In D39958#909666, @imp wrote:

seems ok, but why?

Yeah, suggest adding something like: "UNIX conformance requires command-line utilities to detect errors writing to stdout, emit an error message and exit accordingly."

Technically we could check every write, but that seems too invasive and not really any better than just catching it at the end.

In fact, that seems like it'd be worse. We shouldn't mask other logical errors just because stdout was somehow borked.

This revision was automatically updated to reflect the committed changes.