1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-27 08:52:26 +03:00

Fully release exclusive locks in the Unlock primitive of Unix.

Ticket #913. (CVS 1993)

FossilOrigin-Name: 11a37a74b101b9e37dcf1c3e57e45fbcd39a1c21
This commit is contained in:
drh
2004-10-01 03:02:48 +00:00
parent eb206256f1
commit ededaa59bd
3 changed files with 12 additions and 7 deletions

View File

@@ -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;