[416] in linux-net channel archive

home help back first fref pref prev next nref lref last post

Re: (fwd) RDIST again: CPIO & RMT also?

daemon@ATHENA.MIT.EDU (Mark W. Eichin)
Mon Jun 5 05:43:33 1995

Date: Sun, 4 Jun 95 21:49:34 -0400
From: "Mark W. Eichin" <eichin@mit.edu>
To: ig25@mvmampc66.ciw.uni-karlsruhe.de
Cc: linux-net@vger.rutgers.edu
In-Reply-To: <199506042057.WAA01776@mvmampc66.ciw.uni-karlsruhe.de> (message from Thomas Koenig on Sun, 4 Jun 1995 22:57:53 +0200)


> I checked out the "rdist" diffs and I was confused. Why do we have to put this
> "while" statements around the write() system-calls? Do I miss something here?

Under linux, writes to pipes are not guaranteed to complete; they can
return an indication that only *some* of the data got written, even
when the pipes aren't non-blocking. read works the same way but people
are more used to that -- at least with a network connection -- and
read tends to already be in a loop to be sure to get all the data
desired, as opposed to just the amount that shows up this time. Write
needs the same behaviour.

rdist was particularly sensitive to this, probably due to large writes
to pipes; I never fully analyzed the problem (or decided whether or
not it was a linux bug!) after I fixed it...

					_Mark_ <eichin@cygnus.com>
					Cygnus Support, East Coast

home help back first fref pref prev next nref lref last post