[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/3] Always use nonblocking mode for qemu_chr_open_f
From: |
Ian Jackson |
Subject: |
[Qemu-devel] [PATCH 2/3] Always use nonblocking mode for qemu_chr_open_fd. |
Date: |
Fri, 18 Jul 2008 14:24:17 +0100 |
The rest of qemu assumes that IO operations on a CharDriverState do
not block. Currently there are a couple of cases where such a driver
was set up but the calls to set nonblocking mode were missing:
* qemu_chr_open_pty
* qemu_chr_open_pipe
* qemu_chr_open_stdio
This is fixed by adding two calls to socket_set_nonblock to
qemu_chr_open_fd.
Signed-off-by: Ian Jackson <address@hidden>
---
vl.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/vl.c b/vl.c
index 4f31288..c428c7e 100644
--- a/vl.c
+++ b/vl.c
@@ -2090,6 +2090,9 @@ static CharDriverState *qemu_chr_open_fd(int fd_in, int
fd_out)
CharDriverState *chr;
FDCharDriver *s;
+ socket_set_nonblock(fd_in);
+ socket_set_nonblock(fd_out);
+
chr = qemu_mallocz(sizeof(CharDriverState));
if (!chr)
return NULL;
--
1.4.4.4
- [Qemu-devel] [PATCH 2/3] Always use nonblocking mode for qemu_chr_open_fd.,
Ian Jackson <=
- Re: [Qemu-devel] [PATCH 2/3] Always use nonblocking mode for qemu_chr_open_fd., Anthony Liguori, 2008/07/22
- Re: [Qemu-devel] [PATCH 2/3] Always use nonblocking mode for qemu_chr_open_fd., Daniel P. Berrange, 2008/07/23
- Re: [Qemu-devel] [PATCH 2/3] Always use nonblocking mode for qemu_chr_open_fd., Gerd Hoffmann, 2008/07/23
- Re: [Qemu-devel] [PATCH 2/3] Always use nonblocking mode for qemu_chr_open_fd., Daniel P. Berrange, 2008/07/23
- Re: [Qemu-devel] [PATCH 2/3] Always use nonblocking mode for qemu_chr_open_fd., Gerd Hoffmann, 2008/07/23
- Re: [Qemu-devel] [PATCH 2/3] Always use nonblocking mode for qemu_chr_open_fd., Daniel P. Berrange, 2008/07/23
- Re: [Qemu-devel] [PATCH 2/3] Always use nonblocking mode for qemu_chr_open_fd., Gerd Hoffmann, 2008/07/23
- Re: [Qemu-devel] [PATCH 2/3] Always use nonblocking mode for qemu_chr_open_fd., Anthony Liguori, 2008/07/23
- Re: [Qemu-devel] [PATCH 2/3] Always use nonblocking mode for qemu_chr_open_fd., Daniel P. Berrange, 2008/07/23
- Re: [Qemu-devel] [PATCH 2/3] Always use nonblocking mode for qemu_chr_open_fd., Anthony Liguori, 2008/07/23