You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2009/11/09 17:37:54 UTC

svn commit: r834136 - /apr/apr/trunk/poll/unix/port.c

Author: trawick
Date: Mon Nov  9 16:37:50 2009
New Revision: 834136

URL: http://svn.apache.org/viewvc?rev=834136&view=rev
Log:
fix pollcb hangs on Solaris when using Event Ports

passing nget=n will block until n events are available
(or timeout/signal occurs)

possible future optimization:

in order to retrieve 1 or more events, first call port_getn()
with nget=0 to find out how many events are available, then 
call it again with the number available

Modified:
    apr/apr/trunk/poll/unix/port.c

Modified: apr/apr/trunk/poll/unix/port.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/poll/unix/port.c?rev=834136&r1=834135&r2=834136&view=diff
==============================================================================
--- apr/apr/trunk/poll/unix/port.c (original)
+++ apr/apr/trunk/poll/unix/port.c Mon Nov  9 16:37:50 2009
@@ -537,7 +537,7 @@
 {
     apr_pollfd_t *pollfd;
     apr_status_t rv;
-    unsigned int i, nget = pollcb->nalloc;
+    unsigned int i, nget = 1;
 
     rv = call_port_getn(pollcb->fd, pollcb->pollset.port, pollcb->nalloc,
                         &nget, timeout);