installHandler, sleep, and interrupts.
Anders Lau Olsen
alauo at mip.sdu.dk
Mon Oct 29 15:56:00 EST 2001
When interrupting this program, the signal handler does not get called:
module Main where
import Posix
main = do
installHandler 2 (Catch (putStrLn "Hello, world!")) Nothing
sleep 600
-- putStr ""
Curiously, if the last line is uncommented, the program works as expected:
% ./program
^C
Hello, world!
This is for GHC version 5.02, run on Linux 2.2.5-15.
Anders Lau Olsen
More information about the Glasgow-haskell-bugs
mailing list