From 8917fb30bf2320a8fe06a2292606467644c71d84 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Sun, 11 Aug 2019 12:22:02 +0300 Subject: [PATCH] mdbx: make lck-wait ops breakable for linux/posix. Change-Id: Ieb113f3c01bceced99b122988f93331d5619c2be --- src/lck-linux.c | 2 +- src/lck-posix.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lck-linux.c b/src/lck-linux.c index d46ebf47..6ab9907b 100644 --- a/src/lck-linux.c +++ b/src/lck-linux.c @@ -143,7 +143,7 @@ static int mdbx_lck_op(mdbx_filehandle_t fd, int cmd, short lck, off_t offset, return 0; } int rc = errno; - if (rc != EINTR) + if (rc != EINTR || cmd == op_setlkw) return rc; } } diff --git a/src/lck-posix.c b/src/lck-posix.c index 5bfb55b3..c8f20b57 100644 --- a/src/lck-posix.c +++ b/src/lck-posix.c @@ -105,7 +105,7 @@ static int mdbx_lck_op(mdbx_filehandle_t fd, int cmd, short lck, off_t offset, return 0; } int rc = errno; - if (rc != EINTR) + if (rc != EINTR || cmd == F_SETLKW) return rc; } }