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)
Thu, Apr 11, 12:26 PM
Unknown Object (File)
Dec 20 2023, 8:03 AM
Unknown Object (File)
Dec 18 2023, 3:40 PM
Unknown Object (File)
Dec 13 2023, 10:05 AM
Unknown Object (File)
Nov 19 2023, 6:59 AM
Unknown Object (File)
Nov 17 2023, 3:26 PM
Unknown Object (File)
Nov 17 2023, 3:19 PM
Unknown Object (File)
Oct 3 2023, 12:42 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.