summaryrefslogtreecommitdiff
path: root/testsuite/tests/lib/libposix/posix014.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/lib/libposix/posix014.hs')
-rw-r--r--testsuite/tests/lib/libposix/posix014.hs19
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/tests/lib/libposix/posix014.hs b/testsuite/tests/lib/libposix/posix014.hs
new file mode 100644
index 0000000000..bb3518c440
--- /dev/null
+++ b/testsuite/tests/lib/libposix/posix014.hs
@@ -0,0 +1,19 @@
+--!! Basic pipe usage
+module Main(main) where
+
+import Posix
+
+main = do
+ str <- getEffectiveUserName
+ putStrLn str
+ (rd, wd) <- createPipe
+ n <- forkProcess
+ case n of
+ Nothing -> do
+ (str,_) <- fdRead rd 32
+ -- avoid them zombies
+ putStrLn str
+ Just pid -> do
+ fdWrite wd "Hi, there - forked child calling"
+-- getProcessStatus False True pid
+ return ()