Sender: rich AT phekda DOT freeserve DOT co DOT uk Message-ID: <3E300A5D.1B191861@phekda.freeserve.co.uk> Date: Thu, 23 Jan 2003 15:29:33 +0000 From: Richard Dawe X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.23 i586) X-Accept-Language: de,fr MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com Subject: Re: readv, writev [PATCH] References: <200301231347 DOT OAA06033 AT lws256 DOT lu DOT erisoft DOT se> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Hello. Martin Stromberg wrote: > > Richard said: > > Martin Stromberg wrote: > > > > > > > Say you write the first part of the data, but then the write for the > > > > next part fails. What do you return? The call has failed, but > > > > you have written some > > > > > > No. It succeeded in writing the first part. You return the value of as > > > many bytes you've written. (Just as write would do if it partially > ^^ "it" is write(). > > > wrote something.) > > > > If write partially writes something, it doesn't fail. > ^^ Is "it" writev()? No, "it" is write. > The above sentence doesn't make sense, unless you misunderstood me. If write partially writes something, it doesn't fail. I.e.: if write returns less than you asked it (a partial write), it hasn't failed. It was a statement for emphasis. > Or I don't understand. > > > If the second write fails, how do you know how much data it has written? I How much data does write() write, when it fails? > Talking about write(): the return value if > 0. 0 otherwise. Bye, Rich =] -- Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]