diff options
author | danielk1977 <danielk1977@noemail.net> | 2004-06-28 08:25:47 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2004-06-28 08:25:47 +0000 |
commit | 489468cf26df6eb5b791a063a9e1059848106244 (patch) | |
tree | ae62e466ebb4b4d1749e4070847b02c68f7b9e8b /src/os_unix.c | |
parent | 8191bff0c2389a60a34483da685f343e030bd629 (diff) | |
download | sqlite-489468cf26df6eb5b791a063a9e1059848106244.tar.gz sqlite-489468cf26df6eb5b791a063a9e1059848106244.zip |
Add a simple test case for inter-process locking. (CVS 1752)
FossilOrigin-Name: b0fcc99d227c061203fb1e0f4583b66723033159
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 38492b3b6..61e8976c3 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -796,7 +796,7 @@ int sqlite3OsLock(OsFile *id, int locktype){ if( locktype==SHARED_LOCK || (locktype==EXCLUSIVE_LOCK && id->locktype<PENDING_LOCK) ){ - lock.l_type = F_RDLCK; + lock.l_type = (locktype==SHARED_LOCK?F_RDLCK:F_WRLCK); lock.l_start = PENDING_BYTE; s = fcntl(id->h, F_SETLK, &lock); if( s ){ |