Windows blocking locks. (#200)

This commit is contained in:
Nuno Cruces
2024-12-11 15:05:22 +00:00
committed by GitHub
parent 5f1d5727cd
commit 7f5ea54009
7 changed files with 52 additions and 23 deletions

View File

@@ -101,6 +101,9 @@ func syscallOpen(path string, mode int, perm uint32) (fd Handle, err error) {
const _FILE_FLAG_WRITE_THROUGH = 0x80000000
attrs |= _FILE_FLAG_WRITE_THROUGH
}
if mode&O_NONBLOCK != 0 {
attrs |= FILE_FLAG_OVERLAPPED
}
return CreateFile(pathp, access, sharemode, sa, createmode, attrs, 0)
}