Create a lock using fcntl(2).
type
is CAMEL_LOCK_WRITE or CAMEL_LOCK_READ, to create exclusive or shared read locks
The function does nothing and returns success (zero), when fcntl locking had not been compiled.
fd |
a file descriptor |
type |
a LockType |
-1 on error. |