From c5a4de9db902968f08f5401de74246bd04b6eee9 Mon Sep 17 00:00:00 2001 From: Andreas Voellmy Date: Sun, 17 Mar 2013 22:27:49 -0400 Subject: 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. --- libraries/base/tests/T7773.hs | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 libraries/base/tests/T7773.hs (limited to 'libraries/base/tests/T7773.hs') 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 -- cgit v1.2.1