apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r834136 - /apr/apr/trunk/poll/unix/port.c
Date Mon, 09 Nov 2009 16:37:54 GMT
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);



Mime
View raw message