#1185: can't do I/O in the child of forkProcess with -threaded
---------------------------------+------------------------------------------
Reporter: simonmar | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 6.12.1
Component: Runtime System | Version: 6.6
Severity: normal | Resolution:
Keywords: | Difficulty: Moderate (1 day)
Testcase: | Os: Unknown/Multiple
Architecture: Unknown/Multiple |
---------------------------------+------------------------------------------
Changes (by simonmar):
* difficulty: Easy (1 hr) => Moderate (1 day)
Comment:
Replying to [comment:20 bsdemon]:
> Maybe a stupid question, but...
>
> After reading sources, it seems that
'''GHC.Conc.ensureIOManagerIsRunning''' is exported from module. Why we
cannot use it for starting I/O Manager after '''forkProcess'''?
Unfortunately it's not that simple. The IO manager is started by an
`unsafePerformIO` in the definition of `pendingEvents`, and
`ensureIOManagerIsRunning` just seqs the thunk, so it won't do anything to
call it after forking.
I think we probably have to keep track of the IO manager thread explicitly
in the RTS.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1185#comment:21>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs