I cobbled the following together from bits and pieces I found on
mailing lists. Seems straightforward, but the code I've included
just sits there.
The awaitSignal seems to be causing a problem, in that if I remove it
(and don't call forever recursively) then I get my ALARM 5 sec later.
Otherwise nothing. The problem is that if I don't include awaitSignal,
then, of course, forever is called just as fast as the CPU will go :-)
do putStrLn "ALARM"
do putStrLn "foo"
do installHandler realTimeAlarm (Catch alarm) Nothing
Haskell-Cafe mailing list