On Thu, Nov 15, 2018 at 1:59 PM Johannes Schindelin <Johannes.Schindelin@xxxxxx> wrote: > So yes, we are trying to unlink the `.lock` file, and as far as I can tell that > `unlink()` call comes from the tempfile cleanup asked for by Martin. However, as > we still have a handle open to that file, that call fails. > > I do not think that there is any better way to fix this than to close the file > explicitly. I may be talking nonsense here but I remember someone mentioned something about deleting a file while it's still open on Windows and after a quick internet search, it may be FILE_SHARE_DELETE. Since _we_ open these files, can we just open them with this to be able to delete them? -- Duy