runlock(1)

runlock1

Prevent concurrent execution of a process

Synopsys

runlock [ -h ]

runlock [ -d ] [ -f pathname ] [ -t timeout ] command [ args ]

Overview

runlock tries to hold an exclusive lock while it executes a command. Subsequent execution of runlock with the same lock, while that lock is held, will cause the new instance of runlock to terminate with a failure exit code. Otherwise, the exit code of the subprocess is returned.

Usage

-d

Debug mode; send log messages to standard error as well as to the system log.

-f pathname

Specifies the pathname of the file to use as a lock file. The default is to create a lock file in /tmp/cronutils-$USER with the name of the command, and suffix ".pid".

-t timeout

Specifies the duration, in seconds, for runlock to wait before giving up on trying to acquire the lock. The default is 5 seconds.

-h

Prints some basic help.

Releases

7 releases since Debian 7 (Wheezy); the text changed 1 time.

  1. 7–10
  2. 11–13

Bugs

Sending SIGALRM to runlock before the timer has expired will cause the subprocess to be killed.

Author

runlock was written by Jamie Wilkinson <[email protected]>.

From cronutils 1.10-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.