On 28/02/2011 18:53, thomas bonfort wrote:
a few things to try:

* you should use APR_STATUS_IS_EBUSY(s) instead of ... == APR_EBUSY
* after creating the mutex, you might have to set permissions on it:
#ifdef AP_NEED_SET_MUTEX_PERMS
    rc = unixd_set_global_mutex_perms(mutex);
    if(rc != APR_SUCCESS) {
       ap_log_error(APLOG_MARK, APLOG_CRIT, rc, s, "Could not set
permissions on global parent mutex %s", mutex_name);
       return rc;
    }
#endif

* I *think* that calling the lock functions twice from a same thread
(without unlocking first) can have undefined behavior, i.e. don't do
the lock() just after the trylock() call.

regards,
thomas

Thanks Thoms,
i'm going to try your code!

--
Simone Caruso
IT Consultant
+39 349 65 90 805
p.iva: 03045250838

Reply via email to