mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
ITS#7377 Wrap fcntl F_SETLK in EINTR loop too.
This can happen even on local filesystems.
This commit is contained in:
parent
ab3fea51dc
commit
38fb8e6eb1
1 changed files with 3 additions and 1 deletions
|
|
@ -2806,7 +2806,9 @@ mdb_env_excl_lock(MDB_env *env, int *excl)
|
|||
lock_info.l_whence = SEEK_SET;
|
||||
lock_info.l_start = 0;
|
||||
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;
|
||||
} else
|
||||
# ifdef MDB_USE_POSIX_SEM
|
||||
|
|
|
|||
Loading…
Reference in a new issue