bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: printf produces no output for %f directive


From: Pádraig Brady
Subject: Re: printf produces no output for %f directive
Date: Fri, 19 Oct 2007 13:50:44 +0100
User-agent: Thunderbird 2.0.0.6 (X11/20071008)

Jim Meyering wrote:
> Bruno Haible <address@hidden> wrote:
>> But my libc's printf() returned -1, signalling failure. coreutils interpreted
>> that as "was empty output, ok". I would have expected an error message and an
>> exit status of 1.
> 
> Strange indeed.
> Could it be a bug in printf for failing, yet not setting the
> stream-failure indicator that is checked by close_stdout's ferror?

I would think the stream failure indicator would only be set
on failures related to the actual output. A little googling
also suggests that SUSv3 says that for *printf()
possible reasons for failure which doesn't set the
streams error indicator, are EILSEQ, EINVAL, and ENOMEM.

Pádraig.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]