aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/libposix/posix014.hs
blob: 9d844b20ce297a60ac8b21667af272896341041d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
-- !! Basic pipe usage
module Main (main) where

import System.Posix

main = do
  (rd, wd) <- createPipe
  pid <- forkProcess $ do (str, _) <- fdRead rd 32
                          putStrLn str
  fdWrite wd "Hi, there - forked child calling"
  getProcessStatus True False pid
  return ()