|
signal handling weirdness: msg#00079lang.haskell.glasgow.bugs
Hello. I'm trying to install a handler for the TERM signal: import System.Posix.Signals import System.Posix.Unistd import Monad main = do installHandler sigTERM handler Nothing sequence (repeat (putStrLn "bla" >> sleep 5)) return () handler = Catch (putStrLn "caught SIGTERM") -- handler = Ignore When you type ^C, the current pause gets cut short, but the program continues to output "bla". It then terminates after another three to five "bla"'s. Installing a signal handler has no effect at all, regardless of whether it's Ignore or Catch (...). /tmp $ ghc -o sig sig.hs -package posix /tmp $ ./sig bla bla bla bla bla sig: interrupted I'm using GHC 6.4 on Debian Linux. Bye, V.W.
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [ ghc-Bugs-1184356 ] amd64 architecture not correctly detected, SourceForge.net |
|---|---|
| Next by Date: | [ ghc-Bugs-1177838 ] libraries/GLUT compile on FreeBSD (patch incl), SourceForge.net |
| Previous by Thread: | [ ghc-Bugs-1184356 ] amd64 architecture not correctly detected, SourceForge.net |
| Next by Thread: | Re: signal handling weirdness, Lemmih |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |