apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r788588 - in /apr/apr/trunk: CHANGES locks/unix/proc_mutex.c
Date Fri, 26 Jun 2009 05:47:24 GMT
Author: bojan
Date: Fri Jun 26 05:47:23 2009
New Revision: 788588

URL: http://svn.apache.org/viewvc?rev=788588&view=rev
Log:
Avoid proc mutex failures by checking for both EAGAIN and EWOULDBLOCK.
Workaround for long standing Linux/hppa bug.
Patch by Stefan Fritsch <sf sfritsch.de>.

Modified:
    apr/apr/trunk/CHANGES
    apr/apr/trunk/locks/unix/proc_mutex.c

Modified: apr/apr/trunk/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/trunk/CHANGES?rev=788588&r1=788587&r2=788588&view=diff
==============================================================================
--- apr/apr/trunk/CHANGES [utf-8] (original)
+++ apr/apr/trunk/CHANGES [utf-8] Fri Jun 26 05:47:23 2009
@@ -1,6 +1,10 @@
                                                      -*- coding: utf-8 -*-
 Changes for APR 2.0.0
 
+  *) On Linux/hppa flock() returns EAGAIN instead of EWOULDBLOCK. This
+     causes proc mutex failures.
+     [Stefan Fritsch <sf sfritsch.de>]
+
   *) Add apr_file_sync() and apr_file_datasync() calls.
      [Bojan Smojver]
 

Modified: apr/apr/trunk/locks/unix/proc_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/locks/unix/proc_mutex.c?rev=788588&r1=788587&r2=788588&view=diff
==============================================================================
--- apr/apr/trunk/locks/unix/proc_mutex.c (original)
+++ apr/apr/trunk/locks/unix/proc_mutex.c Fri Jun 26 05:47:23 2009
@@ -732,7 +732,7 @@
         rc = flock(mutex->interproc->filedes, LOCK_EX | LOCK_NB);
     } while (rc < 0 && errno == EINTR);
     if (rc < 0) {
-        if (errno == EWOULDBLOCK) {
+        if (errno == EWOULDBLOCK || errno == EAGAIN) {
             return APR_EBUSY;
         }
         return errno;



Mime
View raw message