[GHC] #4512: EventLog does not play well with forkProcess

GHC cvs-ghc at haskell.org
Fri Dec 3 00:09:35 CET 2010


#4512: EventLog does not play well with forkProcess
---------------------------------+------------------------------------------
    Reporter:  adept             |        Owner:  adept                      
        Type:  bug               |       Status:  new                        
    Priority:  high              |    Milestone:  7.0.2                      
   Component:  Runtime System    |      Version:  7.0.1                      
    Keywords:                    |     Testcase:                             
   Blockedby:                    |   Difficulty:                             
          Os:  Unknown/Multiple  |     Blocking:                             
Architecture:  Unknown/Multiple  |      Failure:  Incorrect result at runtime
---------------------------------+------------------------------------------
Changes (by adept):

  * owner:  => adept


Comment:

 Well, here is a plan: when forked child process does initEventLogging, it
 should detect that prog_name.evenlog is already opened and being written
 to by another process.

 It could be done with:
 1)OS locks
 2)file-based locking (*.pid files or something similar)
 3)using "static int alreadyWriting", which would be populated by parent
 process.

 I'm inclined to go with (3). Forked child will check to see whether parent
 process is {{{alreadyWriting}}} and will use different filename if
 necessary.

 Comments?

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



More information about the Glasgow-haskell-bugs mailing list