mirror of
https://github.com/corda/corda.git
synced 2025-02-02 09:18:13 +00:00
use pthread_sigmask instead of sigprocmask to unblock signals
Apparently, the behavior of the latter is undefined in multithreaded processes.
This commit is contained in:
parent
cd3d1800c4
commit
f1255c8fd8
@ -924,10 +924,9 @@ handleSignal(int signal, siginfo_t* info, void* context)
|
|||||||
// supposed to work.
|
// supposed to work.
|
||||||
|
|
||||||
sigset_t set;
|
sigset_t set;
|
||||||
|
|
||||||
sigemptyset(&set);
|
sigemptyset(&set);
|
||||||
sigaddset(&set, signal);
|
sigaddset(&set, signal);
|
||||||
sigprocmask(SIG_UNBLOCK, &set, 0);
|
pthread_sigmask(SIG_UNBLOCK, &set, 0);
|
||||||
|
|
||||||
vmJump(ip, frame, stack, thread, 0, 0);
|
vmJump(ip, frame, stack, thread, 0, 0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user