apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Fritsch ...@sfritsch.de>
Subject Workaround for linux/hppa bug
Date Tue, 23 Jun 2009 20:07:46 GMT
Hi,

there is a long standing bug in the Linux/hppa kernel that flock() 
returns EAGAIN and not EWOULDBLOCK. On all other architectures, these 
two are defined to be the same. This causes testprocmutex to fail.

Cheers,
Stefan

--- apr-1.3.3~/locks/unix/proc_mutex.c
+++ apr-1.3.3/locks/unix/proc_mutex.c
@@ -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