aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--posix-aio-compat.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/posix-aio-compat.c b/posix-aio-compat.c
index dc14f5355d..b43c5315a8 100644
--- a/posix-aio-compat.c
+++ b/posix-aio-compat.c
@@ -501,8 +501,11 @@ static void aio_signal_handler(int signum)
{
if (posix_aio_state) {
char byte = 0;
+ ssize_t ret;
- write(posix_aio_state->wfd, &byte, sizeof(byte));
+ ret = write(posix_aio_state->wfd, &byte, sizeof(byte));
+ if (ret < 0 && errno != EAGAIN)
+ die("write()");
}
qemu_service_io();