[Linux-ha-dev] FIFOs, buffering, bugs, etc.

Chris Wright chris@wirex.com
Wed, 7 Mar 2001 09:24:05 -0800


* Alan Robertson (alanr@unix.sh) wrote:
> bmartin@penguincomputing.com wrote:

<snip>

> > First off, the fix is working.  My straces are now much bigger as there is
> > one read for every character.
> 
> You mean the BUG IS FINALLY FIXED??
> 
> 	HURRAY!!
> 
hey, that's great!  glad we got it going ;-)

> > My only remaining confusion about the topic is about the line buffering.
> > The setvbuf manpage doesn't really explain the difference between line
> > and full buffering.
> 
> On output, I understand it completely.  It means that every time you send a
> '\n' it does a flush.  On input, I think I'm confused too..  I put it in
> probably out of wishful thinking, and knowing I didn't want full buffering,
> and not thinking too clearly.

line buffering on input is weird.  for one thing...when you read from a
line buffered stream (??? and this requires a kernel read ???) all line
buffered output streams are required to be flushed, or something along
those lines (of course, same is true for reading from an unbuffered stream).

-chris