diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2010-06-03 15:20:32 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-06-14 15:46:28 -0500 |
commit | ca17a5ec35c66003613b4934ab32231fda713d09 (patch) | |
tree | f15320a0cb2a58acf89f4e48c71bf1e3254dba0e /qemu-thread.c | |
parent | 1b84c84cf7849fb3b1dfd553e63c60ef580bf3b6 (diff) | |
download | qemu-ca17a5ec35c66003613b4934ab32231fda713d09.tar.gz qemu-ca17a5ec35c66003613b4934ab32231fda713d09.tar.bz2 qemu-ca17a5ec35c66003613b4934ab32231fda713d09.zip |
make qemu_thread_create block all signals
All signals will thus be routed through the IO thread.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qemu-thread.c')
-rw-r--r-- | qemu-thread.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/qemu-thread.c b/qemu-thread.c index 3923db74ee..faf406142d 100644 --- a/qemu-thread.c +++ b/qemu-thread.c @@ -137,9 +137,16 @@ void qemu_thread_create(QemuThread *thread, { int err; + /* Leave signal handling to the iothread. */ + sigset_t set, oldset; + + sigfillset(&set); + pthread_sigmask(SIG_SETMASK, &set, &oldset); err = pthread_create(&thread->thread, NULL, start_routine, arg); if (err) error_exit(err, __func__); + + pthread_sigmask(SIG_SETMASK, &oldset, NULL); } void qemu_thread_signal(QemuThread *thread, int sig) |