Marco Molteni wrote:
Hi,

first of all, thanks for providing APR :-)

I think I've found a bug in the kqueue implementation of apr_pollset_poll().
I am using FreeBSD -current with apr-1.2.7, but the SVN trunk
version of kqueue.c has the same bug:

Yep. The patch looks correct to me. I didn't have a chance to get to it this weekend, but I intend to commit it early this week if no one else beats me to it.

...
lines 245,246 convert from timeout (usec) to struct timespec, but line 246
assigns milliseconds to nanoseconds, with a wrong magnitude of 10^6.

Net effect is that a timeout of say 999 msec becomes a timeout of 999 nsec.

Please find attached a proposed patch and a test program to expose the bug.

Thank You for the detailed explanation, test case, and patch; it makes it so much easier for us :)

-Paul

Reply via email to