hpath/unix/tests/libposix/posix014.hs

14 lines
290 B
Haskell
Raw Normal View History

2020-04-14 09:27:28 +00:00
-- !! 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 ()