RBULK-LOCKED(1)

NAME
rbulk-locked - advisory lock for running a program

SYNOPSIS
rbulk-locked -h
rbulk-locked file program [args ...]

DESCRIPTION
rbulk-locked provides an advisory lock on file and runs the specified program with optional arguments. The lock is maintained until program exits (successfully or not), so that multiple instances of rbulk-locked processes with the same file argument will be serialized.

When it cannot acquire a lock immediately, rbulk-locked sleeps for a random amount of time (between 1 and 9 seconds) and tries again. For the duration of the sleep period, rbulk-locked may be interrupted by a signal. It will then return an exit status of 128 plus the signal number. rbulk-locked is otherwise not interruptible and forwards all signals directly to the program.

rbulk-locked runs the program with arguments by calling execvp(2). The exit status of rbulk-locked is that of the program. If a fatal error prevents the creation of a lock on file, rbulk-locked exits with status 2.

NOTES
rbulk-locked is intended for use on an nfs file system where a lock server cannot be run for some reason, or for running a program that does not make use of the lock server. In particular, see the sqlite3 FAQ that states: fcntl(2) file locking is broken on many NFS implementations.

SEE ALSO
fcntl(2), lockd.