summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2006-02-04 20:41:57 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2006-02-04 20:41:57 (GMT)
commitacd5681b1250498ef0c96f5464af694782cea118 (patch)
treec753fb8a2518e97bd5814360ce27fca5821fe8fd
parentebed08a1426019852f5c583245bde28950f9ebba (diff)
downloadflock-acd5681b1250498ef0c96f5464af694782cea118.zip
flock-acd5681b1250498ef0c96f5464af694782cea118.tar.gz
flock-acd5681b1250498ef0c96f5464af694782cea118.tar.bz2
flock-acd5681b1250498ef0c96f5464af694782cea118.tar.xz
Clean up the documentation, and make the man page and help text match.
-rw-r--r--flock.115
-rw-r--r--flock.c8
-rw-r--r--version2
3 files changed, 14 insertions, 11 deletions
diff --git a/flock.1 b/flock.1
index 8c71ff6..84a87b7 100644
--- a/flock.1
+++ b/flock.1
@@ -1,7 +1,7 @@
.\" $Id$
.\" -----------------------------------------------------------------------
.\"
-.\" Copyright 2003 H. Peter Anvin - All Rights Reserved
+.\" Copyright 2003-2006 H. Peter Anvin - All Rights Reserved
.\"
.\" Permission is hereby granted, free of charge, to any person
.\" obtaining a copy of this software and associated documentation
@@ -25,7 +25,7 @@
.\" OTHER DEALINGS IN THE SOFTWARE.
.\"
.\" -----------------------------------------------------------------------
-.TH FLOCK "1" "17 Mar 2003" "flock utility" "H. Peter Anvin"
+.TH FLOCK "1" "4 Feb 2006" "flock utility" "H. Peter Anvin"
.SH NAME
flock \- Manage locks from shell scripts
.SH SYNOPSIS
@@ -69,7 +69,7 @@ waits until the lock is available.
\fB\-s\fP, \fB\-\-shared\fP
Obtain a shared lock, sometimes called a read lock.
.TP
-\fB\-x\fP, \fB\-\-exclusive\fP
+\fB\-x\fP, \fB\-e\fP, \fB\-\-exclusive\fP
Obtain an exclusive lock, sometimes called a write lock. This is the
default.
.TP
@@ -80,11 +80,11 @@ required in special cases, for example if the enclosed command group
may have forked a background process which should not be holding the
lock.
.TP
-\fB\-n\fP, \fB\-\-nonblock\fP
+\fB\-n\fP, \fB\-\-nb\fP, \fB\-\-nonblock\fP
Fail (with an exit code of 1) rather than wait if the lock cannot be
immediately acquired.
.TP
-\fB\-w\fP, \fB\-\-timeout\fP \fIseconds\fP
+\fB\-w\fP, \fB\-\-wait\fP, \fB\-\-timeout\fP \fIseconds\fP
Fail (with an exit code of 1) if the lock cannot be acquired within
\fIseconds\fP seconds. Decimal fractional values are allowed.
.TP
@@ -93,12 +93,15 @@ Close the file descriptor on which the lock is held before executing
\fIcommand\fP. This is useful if \fIcommand\fP spawns a child process
which should not be hold ing the lock.
.TP
+\fB\-c\fP, \fB\-\-command\fP \fIcommand\fP
+Pass a single \fIcommand\fP to the shell with \fB\-c\fP.
+.TP
\fB\-h\fP, \fB\-\-help\fP
Print a help message.
.SH AUTHOR
Written by H. Peter Anvin <hpa@zytor.com>.
.SH COPYRIGHT
-Copyright \(co 2003\-2005 H. Peter Anvin.
+Copyright \(co 2003\-2006 H. Peter Anvin.
.br
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/flock.c b/flock.c
index fe325b0..54560b8 100644
--- a/flock.c
+++ b/flock.c
@@ -1,7 +1,7 @@
/* $Id$ */
/* ----------------------------------------------------------------------- *
*
- * Copyright 2003-2005 H. Peter Anvin - All Rights Reserved
+ * Copyright 2003-2006 H. Peter Anvin - All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
@@ -61,10 +61,10 @@ static void usage(int ex)
{
fprintf(stderr,
"flock version " VERSION "\n"
- "Usage: %s [-seun][-w #] fd#\n"
- " %s [-seon][-w #] file [-c] command...\n"
+ "Usage: %s [-sxun][-w #] fd#\n"
+ " %s [-sxon][-w #] file [-c] command...\n"
" -s --shared Get a shared lock\n"
- " -e --exclusive Get an exclusive lock\n"
+ " -x --exclusive Get an exclusive lock\n"
" -u --unlock Remove a lock\n"
" -n --nonblock Fail rather than wait\n"
" -w --timeout Wait for a limited amount of time\n"
diff --git a/version b/version
index e9307ca..50ffc5a 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-2.0.2
+2.0.3