diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-05-16 14:00:03 +0100 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2014-05-24 00:07:29 +0400 |
commit | aef553fdcabbea8760cd4647ab14859095300023 (patch) | |
tree | 40849a5877bda3fdae17ab1f77a4d480514216b9 | |
parent | 78a4b8d2051bff8e8794e9419b7925122212b096 (diff) | |
download | qemu-aef553fdcabbea8760cd4647ab14859095300023.zip qemu-aef553fdcabbea8760cd4647ab14859095300023.tar.gz qemu-aef553fdcabbea8760cd4647ab14859095300023.tar.bz2 |
iohandler.c: Properly initialize sigaction struct
The code in qemu_init_child_watch() wasn't clearing the 'struct
sigaction' before passing it to sigaction(); this meant that we
would block a random set of signals while executing the SIGCHLD
handler. Initialize properly by using memset() on the struct,
as we do in similar cases elsewhere.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r-- | iohandler.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/iohandler.c b/iohandler.c index ae2ef8f..cca614f 100644 --- a/iohandler.c +++ b/iohandler.c @@ -191,6 +191,7 @@ static void qemu_init_child_watch(void) struct sigaction act; sigchld_bh = qemu_bh_new(sigchld_bh_handler, NULL); + memset(&act, 0, sizeof(act)); act.sa_handler = sigchld_handler; act.sa_flags = SA_NOCLDSTOP; sigaction(SIGCHLD, &act, NULL); |