-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathrunlock.1
66 lines (41 loc) · 1.42 KB
/
runlock.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
.\" -*- nroff -*-
.TH RUNLOCK 1 "October 18, 2010" "Google, Inc."
.SH NAME
runlock \- prevent concurrent execution of a process
.SH SYNOPSYS
\fBrunlock\fR [ \fB-h\fR ]
\fBrunlock\fR [ \fB-d\fR ] [ \fB-f \fIpathname\fR ] [ \fB-t \fItimeout\fR ] \fIcommand\fR [ \fIargs\fR ]
.SH DESCRIPTION
\fBrunlock\fR tries to hold an exclusive lock while it executes a
command. Subsequent execution of \fBrunlock\fR with the same lock,
while that lock is held, will cause the new instance of \fBrunlock\fR
to terminate with a failure exit code. Otherwise, the exit code of the
subprocess is returned.
.SH USAGE
.TP
\fB-d\fR
Debug mode; send log messages to standard error as well as to the
system log.
.TP
\fB-f \fIpathname\fR
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".
.TP
\fB-t \fItimeout\fR
Specifies the duration, in seconds, for \fBrunlock\fR to wait before
giving up on trying to acquire the lock. The default is 5 seconds.
.TP
\fB-h\fR
Prints some basic help.
.SH BUGS
Sending SIGALRM to \fBrunlock\fR before the timer has expired will
cause the subprocess to be killed.
.SH SEE ALSO
\fBrunalarm\fR(1), \fBrunstat\fR(1)
.SH AUTHOR
\fBrunlock\fR was written by Jamie Wilkinson <jaq@google.com>.
.SH COPYRIGHT
This program is copyright (C) 2010 Google, Inc.
.PP
It is licensed under the Apache License, Version 2.0