diff options
author | drh <drh@noemail.net> | 2004-10-01 03:02:48 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2004-10-01 03:02:48 +0000 |
commit | ededaa59bdc409b7ca5895cae3b8314efb084ebb (patch) | |
tree | ba9b5b73a96791a4ad3e7c67239a917072baa727 /src | |
parent | eb206256f1fac9b79fde3375f3670c5ecb52f11b (diff) | |
download | sqlite-ededaa59bdc409b7ca5895cae3b8314efb084ebb.tar.gz sqlite-ededaa59bdc409b7ca5895cae3b8314efb084ebb.zip |
Fully release exclusive locks in the Unlock primitive of Unix.
Ticket #913. (CVS 1993)
FossilOrigin-Name: 11a37a74b101b9e37dcf1c3e57e45fbcd39a1c21
Diffstat (limited to 'src')
-rw-r--r-- | src/os_unix.c | 5 |
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; |