| 175 | } |
| 176 | |
| 177 | static void |
| 178 | installSegFaultHandler() |
| 179 | { |
| 180 | // install SIGSEGV handler |
| 181 | struct sigaction act; |
| 182 | |
| 183 | memset(&act, 0, sizeof(act)); |
| 184 | act.sa_sigaction = segFaultHandler; |
| 185 | act.sa_flags = SA_SIGINFO; |
| 186 | JASSERT(sigaction(SIGSEGV, &act, NULL) == 0) (JASSERT_ERRNO); |
| 187 | } |
| 188 | |
| 189 | /* This function is called at the very beginning of the DmtcpWorker constructor |
| 190 | * to do some initialization work so that DMTCP can later use _real_XXX |
no test coverage detected