1 The shlock command can create or verify a lock file on behalf of a
2 shell or other script program. When it attempts to create a lock
3 file, if one already exists, shlock verifies that it is or is not
4 valid. If valid, shlock will exit with a non-zero exit code. If
5 invalid, shlock will re- move the lock file, and create a new one.
7 shlock uses the rename(2) system call to make the final target lock
8 file, which is an atomic operation (i.e. "dot locking", so named for
9 this mech- anism's original use for locking system mailboxes). It
10 puts the process ID ("PID") from the command line into the requested
13 shlock verifies that an extant lock file is still valid by using
14 kill(2) with a zero signal to check for the existence of the process