mirror of
https://github.com/corda/corda.git
synced 2025-01-22 12:28:11 +00:00
don't defer to previous handler in signal handler
It isn't necessarily safe or desireable to call the previous handler even if it's non-null, so we ignore it entirely except to reinstate it when unregistering our own handler.
This commit is contained in:
parent
86733a25f4
commit
8a28578ef5
@ -865,7 +865,7 @@ class MySystem: public System {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
handleSignal(int signal, siginfo_t* info, void* context)
|
handleSignal(int signal, siginfo_t*, void* context)
|
||||||
{
|
{
|
||||||
ucontext_t* c = static_cast<ucontext_t*>(context);
|
ucontext_t* c = static_cast<ucontext_t*>(context);
|
||||||
|
|
||||||
@ -943,22 +943,14 @@ handleSignal(int signal, siginfo_t* info, void* context)
|
|||||||
default: abort();
|
default: abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (system->oldHandlers[index].sa_flags & SA_SIGINFO
|
switch (signal) {
|
||||||
and system->oldHandlers[index].sa_sigaction)
|
case VisitSignal:
|
||||||
{
|
case InterruptSignal:
|
||||||
system->oldHandlers[index].sa_sigaction(signal, info, context);
|
case PipeSignal:
|
||||||
} else if (system->oldHandlers[index].sa_handler) {
|
break;
|
||||||
system->oldHandlers[index].sa_handler(signal);
|
|
||||||
} else {
|
|
||||||
switch (signal) {
|
|
||||||
case VisitSignal:
|
|
||||||
case InterruptSignal:
|
|
||||||
case PipeSignal:
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
abort();
|
abort();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user