On 24/10/27 06:27PM, Hiltjo Posthuma wrote:
> Thanks for the patch.  I agree and the common pattern is even, at the top of
> the function:
> 
>       int saved_errno = errno;
> 
> Then use (or restore) errno.
> I notice dmenu, dwm, libsl, sbase, etc have this bug.
> 
Sorry, I didn't notice vprintf could set errno as well and made an
incomplete fix.  Thank you for the correction!

On 27/10/2024 07:14PM, Storkman wrote:
> What's the bugged output? Are there implementations that clobber errno
> on success? Or are there circumstances where perror succeeds after fputc
> has already failed?
> 
I would say it's just perfectionism.  die() is such a small and basic
function shared by many programs so perfection makes sense.

Reply via email to