From ef8e481ebde4b5676b48871a74e53ce559f57468 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 1 Aug 2022 13:53:36 -0400 Subject: [PATCH] clarify comment and remove broken link There are archives of MC Knowledgebase, which google will find, I don't want to try to keep a link to an archive working since MS is no longer providing it. --- Utility/LockFile/Windows.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Utility/LockFile/Windows.hs b/Utility/LockFile/Windows.hs index c4b9b67405..08f5e80930 100644 --- a/Utility/LockFile/Windows.hs +++ b/Utility/LockFile/Windows.hs @@ -48,11 +48,12 @@ lockExclusive = openLock fILE_SHARE_NONE - - Will fail if the file is already open with an incompatible ShareMode. - Note that this may happen if an unrelated process, such as a virus - - scanner, even looks at the file. See http://support.microsoft.com/kb/316609 + - scanner, even looks at the file. See Microsoft KnowledgeBase article 316609 - - Note that createFile busy-waits to try to avoid failing when some other - - process briefly has a file open. But that would make checking locks - - much more expensive, so is not done here. Thus, the use of c_CreateFile. + - process briefly has a file open. But that would make this busy-wait + - whenever the file is actually locked, for a rather long period of time. + - Thus, the use of c_CreateFile. - - Also, passing Nothing for SECURITY_ATTRIBUTES ensures that the lock file - is not inherited by any child process.