Create a lock using flock(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 flock locking had not been compiled.
fd |
a file descriptor |
type |
a LockType |
-1 on error. |