> I like the concept, but...
>
> >+        else if (aprset[i].desc_type == APR_NO_DESC) {
> >+            pollset[i].fd = -1;
> >+            continue;
> >
>
> I'm not sure if it's safe to have an fd of -1 in the pollset.

I don't know if its portable but its the right approach on Solaris:

     If the value fd is less than zero,  events  is  ignored  and
     revents is set to 0 in that entry on return from  poll().

> Alternatively, we could compact the aprset array in
> apr_poll_socket_remove().  This can be done in O(1)

You can't do that because you don't own the apr_pollfd_t array, management
of the array is (now) the caller's responsiblity.  apr_poll_socket_remove()
and kin are deprecated.

--rob

Reply via email to