X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fposix%2FSignals.c;h=2380eacfbdd3bf29161644792155ffa45a6626ff;hb=8b08c15b8ace5a76e341939081fbb6ad2736ddd1;hp=8645f1b826c10b5e122e5ab7426f20de308cf8be;hpb=bb7674b77f65ce48d8c89ad2a19c6a9f66f61d56;p=ghc-hetmet.git diff --git a/rts/posix/Signals.c b/rts/posix/Signals.c index 8645f1b..2380eac 100644 --- a/rts/posix/Signals.c +++ b/rts/posix/Signals.c @@ -506,7 +506,7 @@ initDefaultHandlers() sigemptyset(&action.sa_mask); action.sa_flags = 0; if (sigaction(SIGINT, &action, &oact) != 0) { - errorBelch("warning: failed to install SIGINT handler"); + sysErrorBelch("warning: failed to install SIGINT handler"); } #if defined(HAVE_SIGINTERRUPT) @@ -518,7 +518,7 @@ initDefaultHandlers() sigemptyset(&action.sa_mask); action.sa_flags = 0; if (sigaction(SIGCONT, &action, &oact) != 0) { - errorBelch("warning: failed to install SIGCONT handler"); + sysErrorBelch("warning: failed to install SIGCONT handler"); } // install the SIGFPE handler @@ -536,7 +536,7 @@ initDefaultHandlers() sigemptyset(&action.sa_mask); action.sa_flags = 0; if (sigaction(SIGFPE, &action, &oact) != 0) { - errorBelch("warning: failed to install SIGFPE handler"); + sysErrorBelch("warning: failed to install SIGFPE handler"); } #endif @@ -545,4 +545,11 @@ initDefaultHandlers() #endif } +void +freeSignalHandlers(void) { + if (signal_handlers != NULL) { + stgFree(signal_handlers); + } +} + #endif /* RTS_USER_SIGNALS */