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, Sep 24, 8:29 PM
Unknown Object (File)
Tue, Sep 24, 3:24 PM
Unknown Object (File)
Mon, Sep 23, 9:03 PM
Unknown Object (File)
Mon, Sep 23, 4:33 AM
Unknown Object (File)
Sun, Sep 22, 11:32 PM
Unknown Object (File)
Sat, Sep 21, 6:04 AM
Unknown Object (File)
Thu, Sep 19, 5:56 AM
Unknown Object (File)
Sat, Sep 7, 7:39 PM
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.