#include "RtsUtils.h"
#include "RtsFlags.h"
#include "Prelude.h"
+#include "ThrIOManager.h"
#ifdef alpha_HOST_ARCH
# if defined(linux_HOST_OS)
* to POSIX.1 to control whether or not to include SA_NOCLDSTOP when
* installing a SIGCHLD handler.
*/
-StgInt nocldstop = 0;
+HsInt nocldstop = 0;
/* -----------------------------------------------------------------------------
* The table of signal handlers
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)
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
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
#endif
}
+void
+freeSignalHandlers(void) {
+ if (signal_handlers != NULL) {
+ stgFree(signal_handlers);
+ }
+}
+
#endif /* RTS_USER_SIGNALS */