Fix and reenalbe posix009
authorIan Lynagh <igloo@earth.li>
Sun, 20 Nov 2011 14:11:53 +0000 (14:11 +0000)
committerIan Lynagh <igloo@earth.li>
Sun, 20 Nov 2011 14:11:53 +0000 (14:11 +0000)
testsuite/tests/lib/libposix/all.T
testsuite/tests/lib/libposix/posix009.hs
testsuite/tests/lib/libposix/posix009.stdout

index 334d4f2..1524893 100644 (file)
@@ -3,3 +3,4 @@ test('posix003', normal,         compile_and_run, [''])
 test('posix004', reqlib('unix'), compile_and_run, [''])
 test('posix005', [reqlib('unix'), expect_broken(5648)], compile_and_run, [''])
 test('posix006', reqlib('unix'), compile_and_run, [''])
+test('posix009', reqlib('unix'), compile_and_run, [''])
index 1f230f6..906365d 100644 (file)
@@ -1,15 +1,15 @@
-import Posix
+import System.Posix.Signals
+import System.Posix.Unistd
 
-main =
-    putStr "Blocking real time alarms.\n" >>
-    blockSignals (addSignal realTimeAlarm emptySignalSet) >>
-    putStr "Scheduling an alarm in 2 seconds...\n" >>
-    scheduleAlarm 2 >>
-    putStr "Sleeping 5 seconds.\n" >>
-    sleep 5 >>
-    putStrLn "Woken up" >>
-    getPendingSignals >>= \ ints ->
-    putStr "Checking pending interrupts for RealTimeAlarm\n" >>
-    print (inSignalSet realTimeAlarm ints) >>
-    putChar '\n'
+main = do
+    putStrLn "Blocking real time alarms."
+    blockSignals (addSignal realTimeAlarm emptySignalSet)
+    putStrLn "Scheduling an alarm in 2 seconds..."
+    scheduleAlarm 2
+    putStrLn "Sleeping 5 seconds."
+    sleep 5
+    putStrLn "Woken up"
+    ints <- getPendingSignals
+    putStrLn "Checking pending interrupts for RealTimeAlarm"
+    print (inSignalSet realTimeAlarm ints)
 
index e69de29..d294675 100644 (file)
@@ -0,0 +1,6 @@
+Blocking real time alarms.
+Scheduling an alarm in 2 seconds...
+Sleeping 5 seconds.
+Woken up
+Checking pending interrupts for RealTimeAlarm
+True