[commit: ghc] master: base: update comment to match the change from e134af01 (3d7c489)

git at git.haskell.org git at git.haskell.org
Sat Apr 22 02:04:21 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/3d7c489404a0b08c35a1547bff6ab04cb1c30b00/ghc

>---------------------------------------------------------------

commit 3d7c489404a0b08c35a1547bff6ab04cb1c30b00
Author: Andrzej Rybczak <electricityispower at gmail.com>
Date:   Fri Apr 21 20:11:35 2017 -0400

    base: update comment to match the change from e134af01
    
    Reviewers: austin, hvr, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: rwbarton, thomie
    
    Differential Revision: https://phabricator.haskell.org/D3484


>---------------------------------------------------------------

3d7c489404a0b08c35a1547bff6ab04cb1c30b00
 libraries/base/GHC/IO/Handle/Lock.hsc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libraries/base/GHC/IO/Handle/Lock.hsc b/libraries/base/GHC/IO/Handle/Lock.hsc
index ebb3ce4..b2c64c4 100644
--- a/libraries/base/GHC/IO/Handle/Lock.hsc
+++ b/libraries/base/GHC/IO/Handle/Lock.hsc
@@ -127,9 +127,8 @@ lockImpl h ctx mode block = do
     -- We want to lock the whole file without looking up its size to be
     -- consistent with what flock does. According to documentation of LockFileEx
     -- "locking a region that goes beyond the current end-of-file position is
-    -- not an error", however some versions of Windows seem to have issues with
-    -- large regions and set ERROR_INVALID_LOCK_RANGE in such case for
-    -- mysterious reasons. Work around that by setting only low 32 bits.
+    -- not an error", hence we pass maximum value as the number of bytes to
+    -- lock.
     fix $ \retry -> c_LockFileEx wh flags 0 0xffffffff 0xffffffff ovrlpd >>= \case
       True  -> return True
       False -> getLastError >>= \err -> if



More information about the ghc-commits mailing list