qemu-thread: Don't block SEGV, ILL and FPE
commit21a43af0f18335af4abb1959aa28ee9d159a2d43
authorRoman Bolshakov <r.bolshakov@yadro.com>
Mon, 17 Dec 2018 20:26:02 +0000 (17 23:26 +0300)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 8 Jan 2019 12:34:46 +0000 (8 12:34 +0000)
tree352ccb7bfcfdc34fcdcf3647122fde054a5dd74a
parent479a57475ec93390e647ed760c38b2120fef5f58
qemu-thread: Don't block SEGV, ILL and FPE

If any of these signals happen on macOS, they are not delivered to other
threads and signalfd_compat receives nothing. Indeed, POSIX reference
and sigprocmask(2) note that an attempt to block the signals results in
undefined behaviour. SEGV and FPE can't also be received by signalfd(2)
on Linux.

An ability to retrieve SIGBUS via signalfd(2) is used by QEMU for
memory preallocation therefore we can't unblock it without consequences.
But it's important to leave a remark that the signal is lost on macOS.

Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
util/qemu-thread-posix.c