diff --git a/iohandler.c b/iohandler.c index ae2ef8f9669d..cca614f087f6 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);