Mail Archives: djgpp-workers/2003/01/24/13:47:59
Hello.
ams AT ludd DOT luth DOT se wrote:
>
> According to Richard Dawe:
> > Martin Stromberg wrote:
> > [snip]
> > > Why do we want to fail the writev() call? It clearly succeeded in
> > > writing the bytes it wrote from Entry 1.
> > >
> > > I just don't get it.
> >
> > By returning what the first write() wrote we are hiding the fact that the
> > second write() failed. I'm worried that when the second write() fails, it
> > might leave the file in a bad state. For normal files this is not a
> > problem. But what about FSEXTs?
>
> I can perhaps understand why you're worrying. However, so what? What
> can you do? Any seeking or something trying to restore the state
> before the failure is almost certain to make it worse.
You can't do anything, but make it worse. This is one reason why it may be
better to do the write in one go - to fail "correctly".
[snip]
> > Why what? Why am I embarrassed? Because I've said my implementation was a
> > bit
>
> Why embarrassed?
>
> > lame, but I have basically the same implementation as glibc and Cygwin.
> > Or:
>
> Wouldn't that rather be sign to be proud? You came up with the same
> solution that other clever (supposedly, i. e.) persons coded.
Possibly. I think being too proud is a bad thing - it blinds you from the bad
points. But perhaps that's the perfectionist in me speaking. ;)
Bye, Rich =]
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
- Raw text -