[erlang-questions] file:sync

Matthew Sackman matthew@REDACTED
Thu Mar 8 23:50:53 CET 2007


Hi,

Err, I'm slightly surprised there's been no response to this. Surely
this has massive implications for the reliability of dets and mnesia,
amongst other things like disk_log and general file operations on win32.
Or is win32 a second-class citizen for Erlang?

On Wed, Mar 07, 2007 at 12:20:08PM +0000, Matthew Sackman wrote:
> So, for ./erts/emulator/drivers/unix/unix_efile.c
> 
> int
> efile_fsync(Efile_error *errInfo, /* Where to return error codes. */
> 	    int fd)               /* File descriptor for file to sync. */
> {
> #ifdef NO_FSYNC
> #ifdef VXWORKS
>     return check_error(ioctl(fd, FIOSYNC, 0), errInfo); 
> #else
>   undefined fsync
> #endif /* VXWORKS */
> #else
>     return check_error(fsync(fd), errInfo);
> #endif /* NO_FSYNC */
> }
> 
> ok - the important line being the last where fsync is actually called
> which is in glibc unistd.h which is imported. Fine.
> 
> Then we have for ./erts/emulator/drivers/win32/win_efile.c
> 
> int
> efile_fsync(errInfo, fd)
> Efile_error* errInfo;		/* Where to return error codes. */
> int fd;				/* File descriptor for file to sync. */
> {
>     return 1;
> }

Matthew
-- 
Matthew Sackman
http://www.wellquite.org/



More information about the erlang-questions mailing list