aboutsummaryrefslogtreecommitdiff
path: root/util/main-loop.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2017-02-08 13:22:12 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2017-03-03 16:40:02 +0100
commitd98d407234713d05b77114237f839c43a8152089 (patch)
tree2a4a461d82af63d83f2fdce46eb73de3ac654ba8 /util/main-loop.c
parent30f3dda24b2a4cd30f8fbf984ab08ef08eaf5020 (diff)
downloadqemu-d98d407234713d05b77114237f839c43a8152089.zip
qemu-d98d407234713d05b77114237f839c43a8152089.tar.gz
qemu-d98d407234713d05b77114237f839c43a8152089.tar.bz2
cpus: remove ugly cast on sigbus_handler
The cast is there because sigbus_handler is invoked via sigfd_handler. But it feels just wrong to use struct qemu_signalfd_siginfo in the prototype of a function that is passed to sigaction. Instead, do a simple-minded conversion of qemu_signalfd_siginfo to siginfo_t. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'util/main-loop.c')
-rw-r--r--util/main-loop.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/util/main-loop.c b/util/main-loop.c
index ad10bca..ca7bb07 100644
--- a/util/main-loop.c
+++ b/util/main-loop.c
@@ -34,8 +34,6 @@
#ifndef _WIN32
-#include "qemu/compatfd.h"
-
/* If we have signalfd, we mask out the signals we want to handle and then
* use signalfd to listen for them. We rely on whatever the current signal
* handler is to dispatch the signals when we receive them.
@@ -63,8 +61,7 @@ static void sigfd_handler(void *opaque)
sigaction(info.ssi_signo, NULL, &action);
if ((action.sa_flags & SA_SIGINFO) && action.sa_sigaction) {
- action.sa_sigaction(info.ssi_signo,
- (siginfo_t *)&info, NULL);
+ sigaction_invoke(&action, &info);
} else if (action.sa_handler) {
action.sa_handler(info.ssi_signo);
}