s3: tdb: On some platforms pthread_mutex_trylock() returns EBUSY not EDEADLK.
authorJeremy Allison <jra@samba.org>
Tue, 28 Jun 2016 19:26:40 +0000 (12:26 -0700)
committerVolker Lendecke <vl@samba.org>
Wed, 29 Jun 2016 13:14:44 +0000 (15:14 +0200)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Jun 29 15:14:44 CEST 2016 on sn-devel-144

lib/tdb/common/mutex.c

index c212842746827d6a6c7d6b6f577ece61175fb889..280dec1f6b8f0d8671b15e78c75a2ba0067cffd2 100644 (file)
@@ -925,7 +925,7 @@ _PUBLIC_ bool tdb_runtime_check_for_robust_mutexes(void)
        }
 
        ret = pthread_mutex_trylock(m);
-       if (ret != EDEADLK) {
+       if (ret != EDEADLK && ret != EBUSY) {
                pthread_mutex_unlock(m);
                goto cleanup;
        }