apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r788591 - in /apr/apr/branches/1.3.x: ./ CHANGES locks/unix/proc_mutex.c
Date Fri, 26 Jun 2009 05:51:11 GMT
Author: bojan
Date: Fri Jun 26 05:51:10 2009
New Revision: 788591

URL: http://svn.apache.org/viewvc?rev=788591&view=rev
Log:
Backport r788588 from the trunk.
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/branches/1.3.x/   (props changed)
    apr/apr/branches/1.3.x/CHANGES
    apr/apr/branches/1.3.x/locks/unix/proc_mutex.c

Propchange: apr/apr/branches/1.3.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jun 26 05:51:10 2009
@@ -1,2 +1,2 @@
 /apr/apr/branches/1.4.x:783970
-/apr/apr/trunk:712674,733052,742752,747990,748361,748371,748565,748988,749810,782838,783398,783958
+/apr/apr/trunk:712674,733052,742752,747990,748361,748371,748565,748988,749810,782838,783398,783958,788588

Modified: apr/apr/branches/1.3.x/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.3.x/CHANGES?rev=788591&r1=788590&r2=788591&view=diff
==============================================================================
--- apr/apr/branches/1.3.x/CHANGES [utf-8] (original)
+++ apr/apr/branches/1.3.x/CHANGES [utf-8] Fri Jun 26 05:51:10 2009
@@ -1,6 +1,10 @@
                                                      -*- coding: utf-8 -*-
 Changes for APR 1.3.6
 
+  *) On Linux/hppa flock() returns EAGAIN instead of EWOULDBLOCK. This
+     causes proc mutex failures.
+     [Stefan Fritsch <sf sfritsch.de>]
+
   *) Set CLOEXEC flags where appropriate. Either use new O_CLOEXEC flag and
      associated functions, such as dup3(), accept4(), epoll_create1() etc.,
      or simply set CLOEXEC flag using fcntl().  PR 46425.  [Stefan Fritsch

Modified: apr/apr/branches/1.3.x/locks/unix/proc_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.3.x/locks/unix/proc_mutex.c?rev=788591&r1=788590&r2=788591&view=diff
==============================================================================
--- apr/apr/branches/1.3.x/locks/unix/proc_mutex.c (original)
+++ apr/apr/branches/1.3.x/locks/unix/proc_mutex.c Fri Jun 26 05:51:10 2009
@@ -683,7 +683,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