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 <ian.jackson@eu.citrix.com>
CharDriverState *chr;
FDCharDriver *s;
+ socket_set_nonblock(fd_in);
+ socket_set_nonblock(fd_out);
+
chr = qemu_mallocz(sizeof(CharDriverState));
if (!chr)
return NULL;