#2835: Handles leak to processes spawned by runInteractiveProcess
----------------------------------+-----------------------------------------
Reporter: sclv | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: libraries/process | Version: 6.10.1
Severity: normal | Resolution: wontfix
Keywords: | Difficulty: Unknown
Testcase: | Os: Unknown/Multiple
Architecture: Unknown/Multiple |
----------------------------------+-----------------------------------------
Changes (by simonmar):
* status: new => closed
* difficulty: => Unknown
* resolution: => wontfix
Comment:
Normally, only pipes created by the `System.Process` library are closed in
child processes, all other FDs are inherited by default. You can request
that all FDs are closed by using the new `close_fds` flag to
`createProcess`; try this replacement for the line containing `runProcess`
in your example:
{{{
forkIO $ createProcess (proc (dir </> pn) ["arg"]){ close_fds=True } >>
forever (threadDelay 100000)
}}}
This behaviour is fairly standard, it's what `popen` on Unix does, and it
also follows the Python library.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2835#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