[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fflush does not detect error case when operating on stdin
From: |
Paul Jarc |
Subject: |
Re: fflush does not detect error case when operating on stdin |
Date: |
Tue, 08 Feb 2005 10:49:52 -0500 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) |
Bernard WEISSER <address@hidden> wrote:
> I found a code that tried to fflush on stdin and that returned a 0
> status but a non-nul errno value.
Calling fflush on an input stream gives undefined behavior, according
to the C standard. Also, library calls are allowed to set errno even
when there is no error. errno is meaningful only when the call fails.
paul