Hello,
Therefore, we suggest replace the deletion of a lock file by renaming it.
unlink in windows is not an atomic operation.
When we try to open the file between
SetDispositionInformationFile and CloseFile we get ERROR_DELETE_PENDING ( see screenshot )
regards, Roman
> 18 июля 2019 г., в 12:38, Michael Paquier <michael@paquier.xyz>
>
> Oh, it is. A lot. And this has been discussed a couple of times
> across multiple threads on -bugs and/or -hackers. I think that
> Windows just lacks a way to detect reliably if a file is pending for
> deletion or not, and there is no way that we are going to enforce
> blindly a ERROR_DELETE_PENDING when we see EACCES. One code path
> which is impacted by that is our wrapper for stat() for the win32
> port... For now I'd rather believe that what the OS tells us is true,
> in which case here it is plain wrong, but well.
> --
> Michael