#2808: createDirectoryIfMissing should be atomic
------------------------------------+---------------------------------------
Reporter: EricKow | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: libraries/directory | Version: 6.10.1
Severity: normal | Resolution:
Keywords: | Testcase:
Architecture: Unknown/Multiple | Os: Unknown/Multiple
------------------------------------+---------------------------------------
Comment (by duncan):
Unfortunately it's not clear that this is possible. The POSIX `mkdir()`
function can returns `EEXIST` however that does not distinguish the case
that there is a existing directory, or that there is an existing file (or
indeed symlink).
It could be atomic but the error code / exception could not necessarily be
accurate. It could check afterwards if the path that already existed was a
file or directory, but of course that will not be atomic.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2808#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs