aboutsummaryrefslogtreecommitdiffstats
path: root/pgaas/src/testlock/testlock.md
diff options
context:
space:
mode:
Diffstat (limited to 'pgaas/src/testlock/testlock.md')
-rw-r--r--pgaas/src/testlock/testlock.md27
1 files changed, 27 insertions, 0 deletions
diff --git a/pgaas/src/testlock/testlock.md b/pgaas/src/testlock/testlock.md
new file mode 100644
index 0000000..8ec2a48
--- /dev/null
+++ b/pgaas/src/testlock/testlock.md
@@ -0,0 +1,27 @@
+# testlock 1 "April 26 2006" "" ""
+## NAME
+testlock \- lock a file and run a command with the lock held
+## SYNOPSIS
+testlock [-v] [-t timeout] [-s] [-r exittcode] filename command args ...
+## DESCRIPTION
+
+Testlock will acquire a file lock and then execute a command while the lock is held.
+If no timeout is provided, testlock will wait indefinitely until the file can be locked,
+and then execute the command.
+If a timeout is given, it will stop waiting after that many seconds have passed.
+
+### Options
+
+-t
+Abort if the lock cannot be acquired after _timeout_ seconds.
+If _timeout_ is 0, the lock will be totally non-blocking.
+
+-s
+Silently ignore errors with locking.
+(Other errors will still be reported.)
+
+-r exitcode
+If the lock cannot be acquired, use this exit code instead of the default exit code of 99.
+
+## AUTHOR
+Tony Hansen.