On 2023-12-21 13:19, Zack Weinberg wrote:
Sorry, I'm with GNU here: failure to report errors on writing to stdout
is a bug. No excuses will be accepted.
Agreed. printf commands that silently succeed when they can't do the
requested action are simply broken.
Even if one is not convinced by GNU's good-citizen example, POSIX
requires printf to fail with a diagnostic in this situation. Here's
chapter and verse:
https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/utilities/printf.html#tag_20_94_15
says "CONSEQUENCES OF ERRORS" are "Default", and
https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/utilities/V3_chap01.html#tag_17_04
says that utilities must issue a diagnostic on stderr and exit with
nonzero status when they cannot do the requested action.