PMLOCK(1)

NAME
pmlock - simple file-based mutex

SYNOPSIS
$PCP_BINADM_DIR/pmlock [-i ident] [-v] file

DESCRIPTION
pmlock attempts to acquire an exclusive lock by creating a zero-sized file with a mode of 0.

The -i option changes the behaviour to write ident into file, followed by a newline and the file mode is 0444. ident is an arbitrary string, but by convention it is the process id of the locker followed by the name or identification of the locker command or script.

The exit status is 0 for success, 1 for failure.

To release the lock, remove file with rm(1) or unlink(2).

In the event of a failure, the -v option produces an explanatory message on stderr.

SEE ALSO
rm(1) and unlink(2).