Authors: Christian Thalinger
- Changes:
-
- $Id: signal.c 5806 2006-10-19 10:10:23Z twisti $
+ $Id: signal.c 6123 2006-12-05 21:10:54Z twisti $
*/
# include "threads/native/threads.h"
#endif
+#include "mm/memory.h"
#include "vm/signallocal.h"
#include "vm/options.h"
#include "vm/vm.h"
#if !defined(__CYGWIN__)
struct sigaction act;
+ /* Allocate something so the garbage collector's signal handlers
+ are installed. */
+
+#if defined(ENABLE_GC_BOEHM)
+ (void) GCNEW(u1);
+#endif
+
/* install signal handlers we need to convert to exceptions */
sigemptyset(&act.sa_mask);
# endif
/* catch NullPointerException/StackOverFlowException */
- if (!checknull) {
- act.sa_sigaction = md_signal_handler_sigsegv;
- act.sa_flags = SA_NODEFER | SA_SIGINFO;
+ act.sa_sigaction = md_signal_handler_sigsegv;
+ act.sa_flags = SA_NODEFER | SA_SIGINFO;
#if defined(SIGSEGV)
- sigaction(SIGSEGV, &act, NULL);
+ sigaction(SIGSEGV, &act, NULL);
#endif
#if defined(SIGBUS)
- sigaction(SIGBUS, &act, NULL);
+ sigaction(SIGBUS, &act, NULL);
#endif
- }
/* catch ArithmeticException */