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
Paolo Bonzini <[EMAIL PROTECTED]> writes:
> I don't have CVS access to gnulib; anyway I preferred to have a second
> opinion.
I added you just now. Please install that patch, as it looks good.
* m4/poll.m4: Test for sys/ioctl.h and sys/filio.h.
* lib/poll.c (poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
Looks reasonable to me. But you don't need our permission to install;
you're the maintainer.
I don't have CVS access to gnulib; anyway I preferred to
Paolo Bonzini <[EMAIL PROTECTED]> writes:
> * m4/poll.m4: Test for sys/ioctl.h and sys/filio.h.
> * lib/poll.c (poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
Looks reasonable to me. But you don't need our permission to install;
you're the maintainer.
I enclose the promised updates to the poll module in order to work
around more braindeadness of the Tiger implementation of poll. recvfrom
sometimes ignores MSG_PEEK on some file descriptors, e.g. pipes. We can
more or less work around this using FIONREAD instead (on Mac OS X only,
since the