From 0b7588a7bbbcf6cf1b3d06b1df2ff4c7e9d5ca37 Mon Sep 17 00:00:00 2001 From: aliguori Date: Mon, 22 Sep 2008 14:49:01 +0000 Subject: [PATCH] Do not allow AIO to be inited multiple times This prevents two signalfd() threads from being spawned. This problem was originally spotted by Blue Swirl. Signed-off-by: Anthony Liguori Signed-off-by: Avi Kivity --- block-raw-posix.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block-raw-posix.c b/block-raw-posix.c index c78d73f31b..dcd42fe7d5 100644 --- a/block-raw-posix.c +++ b/block-raw-posix.c @@ -511,6 +511,9 @@ void qemu_aio_init(void) { sigset_t mask; + if (aio_initialized) + return; + aio_initialized = 1; /* Make sure to block AIO signal */ -- 2.11.4.GIT