This is the mail archive of the
mailing list for the Cygwin project.
RE: readv() questions
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: <cygwin at cygwin dot com>
- Date: Wed, 10 May 2006 12:56:05 +0100
- Subject: RE: readv() questions
On 10 May 2006 12:19, email@example.com wrote:
> On Tue, May 09, 2006 at 10:11:35PM -0700, firstname.lastname@example.org wrote:
>> So far so good, but if anyone sees anything glaring might as well point it
>> out - although this is not really CW related at this point.
> Just to follow up on this.. I did take your advice fully Dave, and decided
> to just modify the partial iovec in place and restore a copy of it after
> handling the partial situation.
And there was I thinking "Oh, using a single read() call to get the partial
iovec and then a readv() call with an unmodified array but not starting at
entry  sounds like quite a neat way to deal with it"!
> I think we can rest assured race conditions are out of the picture. My
> code was the culprit, cygwin's was not :).
> In case anyone needs the code for any purpose (I know that I searched usenet
> and web quite a bit looking for any references to short|trunc|partial, etc.
> WRT readv()/writev() and found very little, so this may come in handy to
Heh. Everyone knows /in theory/ that read can return a partial result...
but there's a big gulf between having a bit of knowledge in the back of your
mind and actually following through all the possible implications and
complications that result. You aren't the first to run into this kind of
problem and you won't be the last but you've got it sorted now and that's all
Can't think of a witty .sigline today....
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html