This is the mail archive of the
libc-alpha@sourceware.cygnus.com
mailing list for the glibc project.
Re: Changed information for PR libc/1616
- To: "Robert H. de Vries" <R dot de dot Vries at fokkerspace dot nl>
- Subject: Re: Changed information for PR libc/1616
- From: Andreas Jaeger <aj at suse dot de>
- Date: 09 Mar 2000 17:44:27 +0100
- Cc: libc-alpha Mailinglist <libc-alpha at sourceware dot cygnus dot com>
- References: <Pine.LNX.4.10.10003091652580.13624-100000@hobbes.fokkerspace.nl>
>>>>> 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