add comment
authorSimon Marlow <marlowsd@gmail.com>
Wed, 30 Jul 2008 11:45:59 +0000 (11:45 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Wed, 30 Jul 2008 11:45:59 +0000 (11:45 +0000)
GHC/Handle.hs

index a5ab3c9..0ada376 100644 (file)
@@ -976,6 +976,9 @@ fdToHandle_stat fd mb_stat is_socket filepath mode binary = do
         -- regular files need to be locked
         RegularFile -> do
 #ifndef mingw32_HOST_OS
+           -- On Windows we use explicit exclusion via sopen() to implement
+           -- this locking (see __hscore_open()); on Unix we have to
+           -- implment it in the RTS.
            r <- lockFile fd dev ino (fromBool write)
            when (r == -1)  $
                 ioException (IOError Nothing ResourceBusy "openFile"