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>