[RFC] Force stdio output streams to line-buffered mode

Matthew D. Fuller fullermd at over-yonder.net
Sat Feb 19 20:54:44 UTC 2011


On Sat, Feb 19, 2011 at 07:50:43PM +0100 I heard the voice of
Jeremie Le Hen, and lo! it spake thus:
> 
> I've attached a small patch for stdio, so if the environment variable
> STDIO_IOLBF is set, the output streams will be line-oriented by default.
>     iostat -x 1 | env STDIO_IOLBF=1 grep -v ad10 | cat -n

I've no real comment on anything else (sounds like an interesting
hack, whatever else), but just for this particular case, you know that
grep has a --line-buffered arg, right?


-- 
Matthew Fuller     (MF4839)   |  fullermd at over-yonder.net
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
           On the Internet, nobody can hear you scream.


More information about the freebsd-current mailing list