kern/65402: patch: fflush() should not return error on
readonly files
Colin Percival
colin.percival at wadham.ox.ac.uk
Thu Apr 15 05:10:23 PDT 2004
The following reply was made to PR kern/65402; it has been noted by GNATS.
From: Colin Percival <colin.percival at wadham.ox.ac.uk>
To: freebsd-gnats-submit at FreeBSD.org, hsn at netmag.cz
Cc:
Subject: Re: kern/65402: patch: fflush() should not return error on
readonly files
Date: Thu, 15 Apr 2004 13:01:43 +0100
According to the ISO C standard, the result of calling
fflush() on anything other than an output or update stream
is undefined. FreeBSD's behaviour here is consequently
correct; any behaviour would be correct.
Programs which rely upon fflush() not returning an error
when passed a file which is opened read-only are broken,
and should be fixed.
Colin Percival
More information about the freebsd-bugs
mailing list