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.