apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruediger Pluem <rpl...@apache.org>
Subject Re: apr_pollset_poll return value (APR_EINTR) on solaris
Date Tue, 12 Feb 2008 20:22:32 GMT


On 02/12/2008 08:32 PM, Basant Kukreja wrote:
> Hi,
>    I am Basant Kukreja. I was working on apache httpd bug 42580.
> http://issues.apache.org/bugzilla/show_bug.cgi?id=42580
> 
> I figured out that the cause of the problem might be in APR.  
> 
> apr_pollset_poll function returns APR_TIMEUP even when errno is EINTR. The
> caller functions e.g listener_thread (in worker.c) expects this API to return
> APR_EINTR if apr_pollset_poll fails.
> 
> Other implementation of apr_pollset_poll (as in epoll.c) handles it correctly.
> 
> Please provide your comments. Suggested patch is attached. With this patch the
> issue 42580 seems to be fixed to me.
> 
> Regards,
> Basant.

Does the following patch work for you as well?

Index: poll/unix/port.c
===================================================================
--- poll/unix/port.c    (Revision 627074)
+++ poll/unix/port.c    (Arbeitskopie)
@@ -295,12 +295,7 @@

      if (ret == -1) {
          (*num) = 0;
-        if (errno == ETIME || errno == EINTR) {
-            rv = APR_TIMEUP;
-        }
-        else {
-            rv = APR_EGENERAL;
-        }
+        rv = apr_get_netos_error();
      }
      else if (nget == 0) {
          rv = APR_TIMEUP;


Regards

RĂ¼diger

Mime
View raw message