summaryrefslogtreecommitdiff
path: root/testsuite/tests/lib/IO/concio002.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/lib/IO/concio002.hs')
-rw-r--r--testsuite/tests/lib/IO/concio002.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/lib/IO/concio002.hs b/testsuite/tests/lib/IO/concio002.hs
new file mode 100644
index 0000000000..60a2ed2a89
--- /dev/null
+++ b/testsuite/tests/lib/IO/concio002.hs
@@ -0,0 +1,14 @@
+import System.Process
+import System.IO
+import Control.Concurrent
+
+main = do
+ (hin,hout,herr,ph) <- runInteractiveProcess "cat" [] Nothing Nothing
+ forkIO $ do threadDelay 100000
+ putStrLn "child"
+ hFlush stdout
+ hPutStrLn hin "msg"
+ hFlush hin
+ putStrLn "parent1"
+ hGetLine hout >>= putStrLn
+ putStrLn "parent2"