Paolo Bonzini wrote:
> 2006-09-27 Paolo Bonzini <[EMAIL PROTECTED]>
>
> * m4/poll.m4: Test for sys/ioctl.h and sys/filio.h.
> * lib/poll.c (poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
I took the liberty of moving this ChangeLog entry to m4/ChangeLog and
lib/ChangeLog, re
Paolo Bonzini wrote:
> How so? Only for EAGAIN and EINTR. If FIONREAD is supported, it will
> return EINVAL or something like that.
You're right, sorry. I was confused by the unified diffs (prefer context
diffs).
> >> + errno = 0;
> >>
> >
> > What's the purpose of that? I
+ do
+ r = ioctl (pfd[i].fd, FIONREAD, &avail);
+ while (r == -1 && (errno == EAGAIN || errno == EINTR));
+ if (avail < 0)
+ avail = 0;
When ioctl returns -1, maybe because FIONREAD is not supported or so,
this loops endlessl
Paolo Bonzini wrote:
> + do
> + r = ioctl (pfd[i].fd, FIONREAD, &avail);
> + while (r == -1 && (errno == EAGAIN || errno == EINTR));
> + if (avail < 0)
> + avail = 0;
When ioctl returns -1, maybe because FIONREAD is not supported or s