33 struct sigaction
Foam::sigSegv::oldAction_;
43 if (sigaction(SIGSEGV, &oldAction_, NULL) < 0)
46 <<
"Cannot reset SIGSEGV trapping"
53 error::printStack(
Perr);
82 struct sigaction newAction;
83 newAction.sa_handler = sigHandler;
84 newAction.sa_flags = SA_NODEFER;
85 sigemptyset(&newAction.sa_mask);
86 if (sigaction(SIGSEGV, &newAction, &oldAction_) < 0)
89 <<
"Cannot call sigSegv::set() more than once"
101 if (sigaction(SIGSEGV, &oldAction_, NULL) < 0)
104 <<
"Cannot set SIGSEGV trapping"