fflush() on readonly files

Andrey Chernov ache at nagual.pp.ru
Sat Jun 19 13:35:28 GMT 2004


On Sat, Jun 19, 2004 at 05:29:24PM +0400, Andrey Chernov wrote:
> > > There is no reason to change from the perfectly correct & well-documented
> > > behaviour BSD has had for 10-15 years. The original poster's example provides
> > > a good argument for this: it detects application bugs.
> > 
> > I agree.

Moreover, I agree that it is incorrect (i.e. beyond of standard scope) 
assumption from program side, but what the fix you suggest? There is no 
_standard_ way to detect by given FILE * pointer is it R or W, there is no 
such standard stdio macro.

-- 
Andrey Chernov | http://ache.pp.ru/


More information about the freebsd-arch mailing list