diff options
author | Simon Marlow <simonmar@microsoft.com> | 2007-03-05 14:52:58 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2007-03-05 14:52:58 +0000 |
commit | 6aca925ef28bf0a0a311bc8e33ec9a5aa2ded6ad (patch) | |
tree | 56d12852ae789bc48d0fb8b15837e20a6ca718b1 /tests/queryfdoption01.hs | |
parent | 7b8f8d32be1a6b14317a6373bc4a40b03285aa4d (diff) |
add tests from GHC testsuite
Diffstat (limited to 'tests/queryfdoption01.hs')
-rw-r--r-- | tests/queryfdoption01.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/queryfdoption01.hs b/tests/queryfdoption01.hs new file mode 100644 index 0000000..46833c1 --- /dev/null +++ b/tests/queryfdoption01.hs @@ -0,0 +1,11 @@ +import System.Posix.IO +import System.IO + +showNBR = do + v <- System.Posix.IO.queryFdOption 0 System.Posix.IO.NonBlockingRead + putStr $ "NonBlockingRead = " ++ (show v) ++ "\n" + +main = do + showNBR + System.Posix.IO.setFdOption 0 System.Posix.IO.NonBlockingRead True + showNBR |