Commit a7f31644 authored by simonmar's avatar simonmar
Browse files

[project @ 2005-08-10 10:07:39 by simonmar]

test queryFdOption
parent 414eaa73
...@@ -9,3 +9,5 @@ test('signals002', compose(only_compiler_types(['ghc']), conf), ...@@ -9,3 +9,5 @@ test('signals002', compose(only_compiler_types(['ghc']), conf),
test('fileexist01', conf, compile_and_run, ['-package unix']) test('fileexist01', conf, compile_and_run, ['-package unix'])
test('forkprocess01', compose(only_compiler_types(['ghc']), conf), test('forkprocess01', compose(only_compiler_types(['ghc']), conf),
compile_and_run, ['-package unix']) compile_and_run, ['-package unix'])
test('queryfdoption01', compose(only_compiler_types(['ghc']), conf),
compile_and_run, ['-package unix'])
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment