Re: working sync() code

2004-04-10 Thread David Fritz
GARY VANSICKLE wrote: [snip] SUSv3 has this to say about sync(): The sync() function shall cause all information in memory that updates file systems to be scheduled for writing out to all file systems. The writing, although scheduled, is not necessarily complete upon return from sync(). "sched

RE: working sync() code

2004-04-10 Thread GARY VANSICKLE
[snip] > > SUSv3 has this to say about sync(): > > > The sync() function shall cause all information in memory that updates > file > systems to be scheduled for writing out to all file systems. > > The writing, although scheduled, is not necessarily complete upon return > from > sync(). > >

Re: working sync() code

2004-04-10 Thread David Fritz
GARY VANSICKLE wrote: [...] FlushFileBuffers() doesn't actually do much last I checked. Despite its misleading name, it is not a "commit-to-disk-and-don't-return-until-its-done" [...] SUSv3 has this to say about sync(): The sync() function shall cause all information in memory that updates fil

Re: working sync() code

2004-04-10 Thread Corinna Vinschen
On Apr 10 16:26, Dmitry Karasik wrote: > int > sync( char drive) > { >HANDLE f; >int ret; >char file[7] = ".\\X:"; >file[5] = drive; >f = CreateFile( file, GENERIC_READ|GENERIC_WRITE, > FILE_SHARE_READ|FILE_SHARE_WRITE, > NULL, OPEN_EXISTING, 0, NULL); >

RE: working sync() code

2004-04-10 Thread GARY VANSICKLE
> Hi all, > > I found a way to issue an actual sync() on win32, and as browsing > through winsup directory gave me only this > > > winsup/sygwin/syscalls.cc #1128 > extern "C" int > sync () > { >return 0; > } > > > I think cygwin DLL might benefit from a code I found by looking in > sync.e

working sync() code

2004-04-10 Thread Dmitry Karasik
Hi all, I found a way to issue an actual sync() on win32, and as browsing through winsup directory gave me only this winsup/sygwin/syscalls.cc #1128 extern "C" int sync () { return 0; } I think cygwin DLL might benefit from a code I found by looking in sync.exe by M.Russinovich, which is sc