Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Buffered stderr on Linux
- X-seq: zsh-workers 819
- From: Steven L Baur <steve@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx
- Subject: Re: Buffered stderr on Linux
- Date: 12 Mar 1996 16:16:53 -0800
- In-reply-to: Zoltan Hidvegi's message of 12 Mar 1996 15:17:17 -0800
- Mail-copies-to: never
- Organization: Miranova Systems, Inc.
- References: <199603122317.AAA10871@xxxxxxxxxxxxxxxxx>
- Sender: steve@xxxxxxxxxxxx
>>>>> "Zoltan" == Zoltan Hidvegi <hzoli@xxxxxxxxxx> writes:
Zoltan> Bart Schaefer wrote:
>>
>> Stdio will call free() on the buffer at fclose(). That means you should
>> always pass malloc'd buffers, and never call free() yourself on a buffer
>> that's been passed to any of the setbuf() variants!
Zoltan> Well I've just checked it on Solaris and Linux and it seems
Zoltan> that you are wrong.
...
Zoltan> It means that static buffer can be used with setvbuf.
I checked the source code to Linux libc 5.2.18 && libc 5.3.5 and
Zoltan is correct -- a buffer set by setvbuf is not freed upon fclose().
What does the standard say? My copy of IEEE 1003.1 mentions setvbuf
but doesn't assign any specific details to it.
--
steve@xxxxxxxxxxxx baur
Unsolicited commercial e-mail will be proofread for $250/hour.
Andrea Seastrand: For your vote on the Telecom bill, I will vote for anyone
except you in November.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author