projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e0f3d37
)
add comment
author
Simon Marlow
<marlowsd@gmail.com>
Wed, 30 Jul 2008 11:45:59 +0000
(11:45 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Wed, 30 Jul 2008 11:45:59 +0000
(11:45 +0000)
GHC/Handle.hs
patch
|
blob
|
history
diff --git
a/GHC/Handle.hs
b/GHC/Handle.hs
index
a5ab3c9
..
0ada376
100644
(file)
--- a/
GHC/Handle.hs
+++ b/
GHC/Handle.hs
@@
-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"