httpd spins madly
Laurent Bercot
ska-dietlibc at skarnet.org
Wed Sep 11 13:06:31 UTC 2013
> I take it from your bug report that having pfd[0].events zeroed
> doesn't prevent POLLHUP|POLLERR from being reported :(
Hi Denys,
POSIX says:
> If the value of fd is less than 0, events shall be ignored, andrevents shall be set to 0 in that entry on return from poll().
> In each pollfd structure, poll() shall clear the revents member, except that where the application requested a report on a condition by setting one of the bits of events listed above, poll() shall set the corresponding bit in revents if the requested condition is true. In addition, poll() shall set the POLLHUP, POLLERR, and POLLNVAL flag in revents if the condition is true, even if the application did not set the corresponding bit in events.
If you want to ignore pfd[0] at some point, perform pfd[0] = -1.
--
Laurent
More information about the busybox
mailing list