tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Buffering in standard streams



On Thu, May 21, 2015 at 04:03:33PM -0400, James K. Lowden wrote:
> I have occasionally wanted to control stdio buffering, and I'm not
> persuaded by Ulrich's argument against having libc honor an environment
> variable.  A utility like stdbuf can no more "set up the environment
> properly" than can an environment variable, because both rely on the
> user's understanding about which file descriptors will be used.  
> 
> I would use a syntax like:
> 
> 	STDBUF=4096:line:1024
> 
> to mean
> 
> 	stdin, 4K
> 	stdout, line buffered
> 	stderr, 1K

I fully agree on this part.

Joerg


Home | Main Index | Thread Index | Old Index