Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 59444 invoked from network); 14 Nov 2009 02:26:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Nov 2009 02:26:24 -0000 Received: (qmail 10968 invoked by uid 500); 14 Nov 2009 02:26:24 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 10896 invoked by uid 500); 14 Nov 2009 02:26:24 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 10887 invoked by uid 99); 14 Nov 2009 02:26:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Nov 2009 02:26:24 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Nov 2009 02:26:19 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C1DA023888C2; Sat, 14 Nov 2009 02:25:58 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r836096 - /apr/apr/branches/1.4.x/poll/unix/port.c Date: Sat, 14 Nov 2009 02:25:58 -0000 To: commits@apr.apache.org From: trawick@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091114022558.C1DA023888C2@eris.apache.org> Author: trawick Date: Sat Nov 14 02:25:58 2009 New Revision: 836096 URL: http://svn.apache.org/viewvc?rev=836096&view=rev Log: merge r834136 from trunk: 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/branches/1.4.x/poll/unix/port.c Modified: apr/apr/branches/1.4.x/poll/unix/port.c URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/poll/unix/port.c?rev=836096&r1=836095&r2=836096&view=diff ============================================================================== --- apr/apr/branches/1.4.x/poll/unix/port.c (original) +++ apr/apr/branches/1.4.x/poll/unix/port.c Sat Nov 14 02:25:58 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);