On 21/07/15 09:34, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > --- > qemu-char.c | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/qemu-char.c b/qemu-char.c > index b2b43c5..d956f8d 100644 > --- a/qemu-char.c > +++ b/qemu-char.c > @@ -2798,7 +2798,10 @@ static ssize_t tcp_chr_recv(CharDriverState *chr, char > *buf, size_t len) > #ifdef MSG_CMSG_CLOEXEC > flags |= MSG_CMSG_CLOEXEC; > #endif > - ret = recvmsg(s->fd, &msg, flags); > + do { > + ret = recvmsg(s->fd, &msg, flags); > + } while (ret == -1 && errno == EINTR); > + > if (ret > 0 && s->is_unix) { > unix_process_msgfd(chr, &msg); > }
I think you could also use the TFR() macro from include/qemu-common.h here instead (TFR = temp. failure retry, I think) Thomas