io.h file operations

  • Thread starter Thread starter sf12262766
  • Start date Start date
S

sf12262766

Guest
I have a problems with the following loop on Windows 10 network drive:


for (n = 0; n < N; n++)
{
fd = _open(file, _O_RDWR, _S_IREAD|_S_IWRITE);

_lseek(fd, 0, SEEK_END);
_write(fd, buffer, buflen);
_close(fd);
}


If there is some other process scanning the directory, it happens that the file is smaller after re-opening at step n+1, as if the last write() operation got lost.

Never observed this on Windows 7 and the same network drive, or Linux or local drives.

The full example is here:

File operation error on windows network drives

Continue reading...
 
Back
Top