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
|
||||
handleSignal(int signal, siginfo_t* info, void* context)
|
||||
handleSignal(int signal, siginfo_t*, void* context)
|
||||
{
|
||||
ucontext_t* c = static_cast<ucontext_t*>(context);
|
||||
|
||||
@ -943,13 +943,6 @@ handleSignal(int signal, siginfo_t* info, void* context)
|
||||
default: abort();
|
||||
}
|
||||
|
||||
if (system->oldHandlers[index].sa_flags & SA_SIGINFO
|
||||
and system->oldHandlers[index].sa_sigaction)
|
||||
{
|
||||
system->oldHandlers[index].sa_sigaction(signal, info, context);
|
||||
} else if (system->oldHandlers[index].sa_handler) {
|
||||
system->oldHandlers[index].sa_handler(signal);
|
||||
} else {
|
||||
switch (signal) {
|
||||
case VisitSignal:
|
||||
case InterruptSignal:
|
||||
@ -959,7 +952,6 @@ handleSignal(int signal, siginfo_t* info, void* context)
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
Loading…
Reference in New Issue
Block a user