cURL / Mailing Lists / curl-library / Single Mail


Re: fflush and fsync

From: Dan Fandrich <>
Date: Tue, 22 Apr 2008 11:06:42 -0700

On Tue, Apr 22, 2008 at 05:48:51PM +0100, Jamie Lokier wrote:
> Seems fine to me if both programs are on the same machine.
> If they are on different machines, 'file A written' and 'file B
> created' can be seen out of order on the other machine. Is that
> relevant to the remote testing?

It's very relevant. When I was getting remote testing working a few months
ago I tried it on two machine with a shared NFS directory; the file syncing
problems were very evident in this configuration. I "solved" it by simply
adding a delay of several seconds to the test harness after running each
test step before checking the output files. Even that wasn't completely
reliable, but I didn't attempt to improve it any further.

I don't know whether there's a way to guarantee the file synchronization
semantics we need in all possible remote filesystems (Coda would be an
extreme example). Since the remote case currently requires some customizing
of anyway, it's probably not worth putting too much effort into
this case, but concentrate on making the single machine case reliable.

>>> Dan

--              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-04-22