Changed information for PR libc/1616
Andreas Jaeger
aj@suse.de
Thu Mar 9 08:54:00 GMT 2000
>>>>> Robert H de Vries writes:
> On Sat, 4 Mar 2000 jaeger@gnu.org wrote:
>> Synopsis: core dump after changing buffer using setvbuf
>>
>> State-Changed-From-To: open-closed
>> State-Changed-By: jaeger
>> State-Changed-When: Sat Mar 4 05:16:06 EST 2000
>> State-Changed-Why:
>> The manual page is wrong. You're only allowed to use
>> setvbuf before any I/O. I've sent a correction of the
>> manual page to the manpages maintainer. The glibc documentation
>> documents this correctly.
> I agree with your solution. However I have a suggestion.
> Would it be wise to return an error value to the user when setvbuf is
> called after an I/O operation. Currently, the application will crash after
> some time. This makes it hard for the developer to see that the call to
> setvbuf was wrong. I was misguided because an fwrite call dumped core. If
> the setvbuf call failed immediately, I would have caught the bug in my
> code much earlier.
I'm sending my answer to libc-alpha to give others the chance to
comment.
I don't know how hard to implement this is - AFAIK in general we're
not adding those kinds of checks.
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.rhein-neckar.de
More information about the Libc-alpha
mailing list