In Windows on a Worker thread after registering signals if I call some MAV code the signals are not being trapped.
void RegisterSignals()
{
typedef void (*SignalHandlerPointer)(int);
SignalHandlerPointer previousHandler;
previousHandler = signal(SIGSEGV, SignalHandler);
... // Registering other signals
}
void BadFunc ()
{
int *ptr = nullptr;
*ptr = 45;
}
Since the application is a multi threaded environment and I have used MSDN Thread APIs I tried even registering signals for each thread but even that doesn't work out.
Is there any way so that the signals get trapped? Could anyone help me in this?
All comments and suggestions are appreciated