diff options
author | Paolo Capriotti <p.capriotti@gmail.com> | 2012-03-09 11:44:41 +0000 |
---|---|---|
committer | Paolo Capriotti <p.capriotti@gmail.com> | 2012-03-09 11:44:41 +0000 |
commit | 891c0bf89b89e3995d2dbc1f6f72b43312b14a44 (patch) | |
tree | 2f49d3817b718b226ca37489302bae735bf9ade0 /tests/libposix/posix014.hs | |
parent | 0e8de7869a0f3b32d2ac8cbe2aad74eb7dcf054a (diff) |
Copy tests from GHC testsuite (#1161)
Diffstat (limited to 'tests/libposix/posix014.hs')
-rw-r--r-- | tests/libposix/posix014.hs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/libposix/posix014.hs b/tests/libposix/posix014.hs new file mode 100644 index 0000000..9d844b2 --- /dev/null +++ b/tests/libposix/posix014.hs @@ -0,0 +1,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 () + |