Mail Archives: djgpp-workers/2003/01/23/10:30:18
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/ ]
- Raw text -