aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index aab518f47..c0261e1c7 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -1039,6 +1039,11 @@ int sqlite3OsUnlock(OsFile *id, int locktype){
assert( pLock->cnt!=0 );
if( id->locktype>SHARED_LOCK ){
assert( pLock->locktype==id->locktype );
+ lock.l_type = F_RDLCK;
+ lock.l_whence = SEEK_SET;
+ lock.l_start = SHARED_FIRST;
+ lock.l_len = SHARED_SIZE;
+ fcntl(id->h, F_SETLK, &lock);
lock.l_type = F_UNLCK;
lock.l_whence = SEEK_SET;
lock.l_start = PENDING_BYTE;