[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fprintf failures on read-only streams
From: |
Bruno Haible |
Subject: |
Re: fprintf failures on read-only streams |
Date: |
Wed, 25 May 2011 01:21:20 +0200 |
User-agent: |
KMail/1.9.9 |
Hi Eric,
> Just last week, glibc fixed a bug where vfprintf failed to set ferror()
> when returning EOF due to an attempt to output to a read-only stream:
>
> http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=aec84f5395
>
> Should we update fprintf-posix and friends to detect this bug and work
> around it on older glibc?
I would say no. Hardly any program could be affected by this pitfall,
because whether a stream is opened as read-write or read-only is part of
the logic of the program, and if a programmer does it wrong, he will
notice it quickly on any platform.
> And at any rate, we probably need to update
> docs/posix-functions/[v][f]printf to document it.
Yes, of course.
Bruno
--
In memoriam Georges Darboy <http://en.wikipedia.org/wiki/Georges_Darboy>