Declaration:
int unlock(long handle, long offset, long length);
Description
Releases file-sharing locks.
unlock provides interface to the operating system file-sharing mechanism. unlock removes a lock previously placed with a call to lock. To avoid error, all locks must be removed before closing a file. The program must release all locks before completing.
Returned Value
On success, unlock returns 0. On error, it returns -1.
|