hpath/unix/tests/libposix/posix014.hs

14 lines
290 B
Haskell

-- !! 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 ()