From f1255c8fd8cb5f2b812d66c6d101ea551015ab6b Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Fri, 25 Feb 2011 08:13:25 -0700 Subject: [PATCH] use pthread_sigmask instead of sigprocmask to unblock signals Apparently, the behavior of the latter is undefined in multithreaded processes. --- src/posix.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/posix.cpp b/src/posix.cpp index b885e422fc..3fcbb218de 100644 --- a/src/posix.cpp +++ b/src/posix.cpp @@ -924,10 +924,9 @@ handleSignal(int signal, siginfo_t* info, void* context) // supposed to work. sigset_t set; - sigemptyset(&set); sigaddset(&set, signal); - sigprocmask(SIG_UNBLOCK, &set, 0); + pthread_sigmask(SIG_UNBLOCK, &set, 0); vmJump(ip, frame, stack, thread, 0, 0); }