Hacker News new | ask | show | jobs
by throwawaylinux 1561 days ago
> What would be the expected reaction if either puts or fflush returns an error code? You might think, write a message on stderr (which may be different from stdout), but what if stderr is also redirected to a full device? How would you react to the error code returned from that?

I don't think you would react any differently on stderr failure unless you had a more complex system with alternate ways to report such things configured.

Just ignore it and continue to report the major error (stdout) in your exit status.