Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Buffered stderr on Linux
- X-seq: zsh-workers 813
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Zoltan Hidvegi <hzoli@xxxxxxxxxx>, zsh-workers@xxxxxxxxxxxxxxx (zsh-workers)
- Subject: Re: Buffered stderr on Linux
- Date: Tue, 12 Mar 1996 11:24:25 -0800
- In-reply-to: Zoltan Hidvegi <hzoli@xxxxxxxxxx> "Buffered stderr on Linux" (Mar 12, 8:03pm)
- References: <199603121903.UAA10007@xxxxxxxxxxxxxxxxx>
- Reply-to: schaefer@xxxxxxx
On Mar 12, 8:03pm, Zoltan Hidvegi wrote:
} Subject: Buffered stderr on Linux
}
} Now I wander why is it
} necessary to use malloc to allocate these buffers. Is there anything
} against using static char[BUFSIZ] buffers?
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!
--
Bart Schaefer
http://www.well.com/user/barts
Messages sorted by:
Reverse Date,
Date,
Thread,
Author