diff options
Diffstat (limited to 'testsuite/tests/lib/IO/hReady002.hs')
-rw-r--r-- | testsuite/tests/lib/IO/hReady002.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/lib/IO/hReady002.hs b/testsuite/tests/lib/IO/hReady002.hs new file mode 100644 index 0000000000..6db22a13fc --- /dev/null +++ b/testsuite/tests/lib/IO/hReady002.hs @@ -0,0 +1,10 @@ +-- test for bug #4078
+import System.IO
+import Control.Concurrent
+import System.Exit
+
+main = do
+ m <- newEmptyMVar
+ forkIO $ do threadDelay 500000; putMVar m Nothing
+ forkIO $ do hReady stdin >>= putMVar m . Just
+ takeMVar m >>= print
|