Copy tests from GHC testsuite (#1161)
[packages/unix.git] / tests / libposix / posix014.hs
1 -- !! Basic pipe usage
2 module Main (main) where
3
4 import System.Posix
5
6 main = do
7 (rd, wd) <- createPipe
8 pid <- forkProcess $ do (str, _) <- fdRead rd 32
9 putStrLn str
10 fdWrite wd "Hi, there - forked child calling"
11 getProcessStatus True False pid
12 return ()
13