Lock result codes

Resource locking result codes.
These result codes allow the caller to know if a lock request succeeded, and, if not, why. They are a necessary part of resource locking.

LKR_OK
All is well, the lock request was successful.

LKR_STALE
The requested resource is locked, but the lock is stale. That is, the process that owned the lock has died. Your process may lock the resource.

LKR_OWN
The lock exists, and belongs to you.

LKR_TIMEOUT
There was a timeout while waiting for the lock to be removed. This result code is not returned by the daemon. Handling timeouts is the responsibility of the BBS library and they are reported locally.

LKR_ERROR
A strange error has occur-ed. Whoops.

LKR_SYNTAX
The lock daemon could not understand your request.

Any other result code greater than zero denotes the PID of a process holding the lock in question.


o LKR_OK
Operation successful
o LKR_STALE
Lock's owner is dead, lock is removed
o LKR_OWN
Lock belongs to the caller
o LKR_TIMEOUT
Timeout waiting for lock to be removed
o LKR_ERROR
Some other error occurred
o LKR_SYNTAX
Lockd failed to parse the request

Alphabetic index



This page was generated with the help of DOC++.