[GHC] #4363: openFile sharing permissions are inconsistent
across platforms
GHC
cvs-ghc at haskell.org
Fri Oct 8 04:15:49 EDT 2010
#4363: openFile sharing permissions are inconsistent across platforms
---------------------------------+------------------------------------------
Reporter: jystic | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: libraries/base | Version: 6.12.3
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Windows | Blocking:
Architecture: Unknown/Multiple | Failure: Incorrect result at runtime
---------------------------------+------------------------------------------
Comment(by simonmar):
The Haskell standard requires us to implement single-writer/multiple-
reader locking, which is what the above code is doing. Unfortunately the
locking extends outside the process, which is unfortunate (but is in the
spirit of the Haskell locking requirement).
One reason for the locking is so that you can't open a file for writing
that you also have open for lazy I/O. However, there are other ways to
achieve unexpected results with lazy I/O. My personal view is that this
locking has caused more trouble and surprising behaviour than it saves,
and we should just default to whatever locking semantics the OS provides.
I'd be interested to hear what others think about this. Maybe we could do
a Haskell 2011/2012 proposal to get it changed, and in the meantime we
could change it in GHC too.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4363#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list