ITS#7377 Wrap fcntl F_SETLK in EINTR loop too.

This can happen even on local filesystems.
vmware
Hallvard Furuseth 12 years ago
parent ab3fea51dc
commit 38fb8e6eb1
  1. 4
      libraries/libmdb/mdb.c

@ -2806,7 +2806,9 @@ mdb_env_excl_lock(MDB_env *env, int *excl)
lock_info.l_whence = SEEK_SET; lock_info.l_whence = SEEK_SET;
lock_info.l_start = 0; lock_info.l_start = 0;
lock_info.l_len = 1; lock_info.l_len = 1;
if (!fcntl(env->me_lfd, F_SETLK, &lock_info)) { while ((rc = fcntl(env->me_lfd, F_SETLK, &lock_info)) &&
(rc = ErrCode()) == EINTR) ;
if (!rc) {
*excl = 1; *excl = 1;
} else } else
# ifdef MDB_USE_POSIX_SEM # ifdef MDB_USE_POSIX_SEM

Loading…
Cancel
Save