#3369: Deadlock sending stdin to a process which does not read it
---------------------+------------------------------------------------------
Reporter: simonmic | Owner:
Type: bug | Status: new
Priority: normal | Component: libraries/process
Version: 6.10.3 | Severity: normal
Keywords: | Testcase:
Os: MacOS X | Architecture: Unknown/Multiple
---------------------+------------------------------------------------------
This code writes some standard input to a command and collects the output:
(ih,oh,eh,ph) ← runInteractiveCommand cmd
forkIO $ hPutStr ih i' -- separate thread in case cmd does not read
stdin
out ← hGetContents oh
err ← hGetContents eh
exit ← waitForProcess ph
But if cmd does not read from stdin, using ghc 6.10.3 or 6.8.2 on a mac
(with or without -threaded), it seems to hang at waitForProcess. (I tried
to work around this by adding forkIO at Heffalump's suggestion, but no
difference. With ghc 6.10.3 on a gnu/linux machine, it works as intended.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3369>
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