id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
478	Problem with Threading under GHC	schachblocki	nobody	"{{{
hi ghc-friends,

i try the following code, but it don't work:

import System.Process
import Control.Concurrent
import System.IO
p = threadDelay 10000000
main3 = do 	putStrLn ""test""
		hClose stdin
		(inp, out, err, pid) <- 
runInteractiveProcess ""Test.exe"" [] Nothing Nothing
		p
		forkIO (putStrLn =<< 
hGetContents out)
  		forkIO (putStrLn =<< 
hGetContents err)
		p
		putStrLn ""inp""
 		forkIO (hPutStrLn inp ""in"" >> 
hClose 
inp)
		p
		forkIO (putStrLn =<< 
hGetContents out)
  		forkIO (putStrLn =<< 
hGetContents err)
		putStrLn ""out""
		threadDelay 1000000
		forkIO (hPutStrLn inp ""quit"" >> 
hClose 
inp)
 		hShow out
		return ()

thanks for helping.

}}}"	bug	closed	normal		GHCi	None	invalid			Unknown/Multiple	Unknown/Multiple						
