apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Saccoccio" <r...@fastcgi.com>
Subject RE: [PATCH] pollacc.c poll.c
Date Tue, 06 Aug 2002 01:17:39 GMT
> 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


Mime
View raw message