On Dec 11, 2005, at 10:02 PM, Branimir Maksimovic wrote:

Problem with mt programs is that they just appear to work but in havy load
situation those errors show once a while.

My loads are pretty heavy. Did not see any problems with SSL yet.

This should be enough reason to scan  for keyboard events instead.
There is no guarantee that SIGINT would be sent only by keyboard.

import System.Posix.Signals

main =
    do installHandler sigINT Ignore Nothing
       x <- getChar
       if x == '\ETX'
          then do print "Gotcha!"
          else do print "Try again!"
                  main

This does not work for ^C. Can it actually be done? Of course I can just read "q" but that would be too simple :-).

        Thanks, Joel

--
http://wagerlabs.com/





_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to