Scroll to navigation

PMLOCK(1) General Commands Manual PMLOCK(1)

NAME

pmlock - simple file-based mutex

SYNOPSIS

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

DESCRIPTION

pmlockattempts to acquire an exclusive lock by creating a zero-sizedfilewith a mode of 0.

The-ioption changes the behaviour to writeidentintofile,followed by a newline and the file mode is 0444.identis an arbitrary string, but by convention it is theprocess id of the locker followed by the name or identificationof the locker command or script.

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

To release the lock, removefilewithrm(1)orunlink(2).

In the event of a failure, the-voption produces an explanatory message onstderr.

SEEALSO

rm(1)andunlink(2).

PCP Performance Co-Pilot