mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-02-15 17:09:31 -07:00
cpus.c: Use pthread_sigmask() rather than sigprocmask()
On Linux, sigprocmask() and pthread_sigmask() are in practice the same thing (they only set the signal mask for the calling thread), but the documentation states that the behaviour of sigprocmask() in a multithreaded process is undefined. Use pthread_sigmask() instead (which is what we do in almost all places in QEMU that alter the signal mask already). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <1463420039-29761-1-git-send-email-peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
e4e697940d
commit
a2d1761da1
1 changed files with 1 additions and 1 deletions
2
cpus.c
2
cpus.c
|
|
@ -780,7 +780,7 @@ static void sigbus_reraise(void)
|
|||
raise(SIGBUS);
|
||||
sigemptyset(&set);
|
||||
sigaddset(&set, SIGBUS);
|
||||
sigprocmask(SIG_UNBLOCK, &set, NULL);
|
||||
pthread_sigmask(SIG_UNBLOCK, &set, NULL);
|
||||
}
|
||||
perror("Failed to re-raise SIGBUS!\n");
|
||||
abort();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue