summaryrefslogtreecommitdiff
path: root/libraries/base/tests/T7773.hs
diff options
context:
space:
mode:
authorAndreas Voellmy <andreas.voellmy@gmail.com>2013-03-17 22:27:49 -0400
committerAndreas Voellmy <andreas.voellmy@gmail.com>2013-05-05 23:08:37 -0400
commitc5a4de9db902968f08f5401de74246bd04b6eee9 (patch)
treefe1f799d752fec748ab0016120f136f9d3fd0192 /libraries/base/tests/T7773.hs
parent557a9a89da64acad9c3f8799fa3e6a4f2cb782dc (diff)
downloadhaskell-c5a4de9db902968f08f5401de74246bd04b6eee9.tar.gz
Update parallel IO manager to handle the invalid files in the same way as previous IO manager.
This patch affects the IO manager using kqueue. See issue #7773. If the kqueue backend cannot wait for events on a file, it will simply call the registered callback for the file immediately. This is the behavior of the previous IO manager. This is not ideal, but it is an initial step toward dealing with the problem properly. Ideally, we would use a non-kqueue mechanism for waiting on files (select seems most reliable) that cannot be waited on with kqueue.
Diffstat (limited to 'libraries/base/tests/T7773.hs')
-rw-r--r--libraries/base/tests/T7773.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/libraries/base/tests/T7773.hs b/libraries/base/tests/T7773.hs
new file mode 100644
index 0000000000..495cd7abd9
--- /dev/null
+++ b/libraries/base/tests/T7773.hs
@@ -0,0 +1,9 @@
+import Control.Concurrent
+import System.Posix.IO
+
+main = do
+ putStrLn "hello"
+ fd <- openFd "/dev/random" ReadOnly Nothing defaultFileFlags
+ threadWaitRead fd
+ putStrLn "goodbye"
+ \ No newline at end of file