[erlang-questions] : : file:sync

Raimo Niskanen <>
Fri Mar 9 15:18:03 CET 2007


After some more digging...

We can not use the _commit() function since it operates on the
posix compatibility filedescriptors that was not reliable enough.

But reading Microsoft's source code for _commit() gives us that it
uses FlushFileBuffers() that would work, and exist for valid platforms.

The original implementor seem to have failed to find the
FlushFileBuffers() function, that is why it is unimplemented.

We will try (no promise; busy period) to squeeze it into R11B-4.

I have looked through win_efile.c and can only find the functions
operating on links that immediately return error, but no more
dummy implemented functions.



On Fri, Mar 09, 2007 at 09:14:15AM +0000, Matthew Sackman wrote:
> Hi,
> 
> On Fri, Mar 09, 2007 at 09:54:19AM +0100, Raimo Niskanen wrote:
> > You are most probably right, and I do not know why _commit() is not used.
> > msdn.microsoft.com claims it has existed since Windows95, and that
> > you only have to include <io.h>.
> > 
> > We will simply have to insert a call to _commit(fd) in win_efile.c.
> > The change will come in a future release.
> 
> Is this likely to be R11B-4 or some later release? The only reason I ask
> is that one of our products is being damaged by the fact that it does
> not behave properly under win32 in comparison to a competitor's product.
> The sooner this can be fixed for us, the better, as I'm sure you can
> see.
> 
> I'll have a look myself, but are you aware of other native calls for
> win32 that are similarly lacking? The problem with finding an issue like
> this is it's now making me wonder what else is missing from the win32
> version. Is there a list or any documentation of these "TODO"-style
> platform-native calls?
> 
> > Thank you for finding the bug.
> 
> You're welcome, and thank you very much for looking into this.
> 
> Matthew
> -- 
> Matthew Sackman
> http://www.wellquite.org/

-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list