[GHC] #2808: createDirectoryIfMissing should be atomic

GHC trac at galois.com
Mon Nov 24 13:25:33 EST 2008


#2808: createDirectoryIfMissing should be atomic
---------------------------------+------------------------------------------
    Reporter:  EricKow           |       Owner:                     
        Type:  bug               |      Status:  new                
    Priority:  normal            |   Component:  libraries/directory
     Version:  6.10.1            |    Severity:  normal             
    Keywords:                    |    Testcase:                     
Architecture:  Unknown/Multiple  |          Os:  Unknown/Multiple   
---------------------------------+------------------------------------------
 If I run createDirectoryIfMissing many times in parallel, it sometimes
 fails because (presumably) somewhere between the check if the directory
 exists, and between the actual creation, something else creates the
 directory.

 Right now my workaround is to catch exceptions with isAlreadyExistsErrors

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2808>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list