chiark / gitweb /
Add manual page for with-lock-ex
authormatthewv <matthewv>
Mon, 7 Jul 2003 04:40:29 +0000 (04:40 +0000)
committermatthewv <matthewv>
Mon, 7 Jul 2003 04:40:29 +0000 (04:40 +0000)
cprogs/Makefile
cprogs/with-lock-ex.1 [new file with mode: 0644]

index fc4b4dc7ee18da1d11cf16c4e79989b2ef8eae5a..f584470e55da284b99b70cb0f339a70a4cbadd39 100644 (file)
@@ -28,7 +28,7 @@ RWBUFFER_SIZE_MB=16
 PROGRAMS=              readbuffer writebuffer with-lock-ex
 SUIDSBINPROGRAMS=      really
 DAEMONS=               trivsoundd
-MAN1PAGES=             readbuffer.1 writebuffer.1
+MAN1PAGES=             readbuffer.1 writebuffer.1 with-lock-ex.1
 MAN8PAGES=             trivsoundd.8 really.8
 
 TARGETS=       $(PROGRAMS) $(SUIDSBINPROGRAMS) $(DAEMONS)
diff --git a/cprogs/with-lock-ex.1 b/cprogs/with-lock-ex.1
new file mode 100644 (file)
index 0000000..6f89277
--- /dev/null
@@ -0,0 +1,32 @@
+.TH WITH-LOCK-EX "1" "July 2003" "Debian" "Chiark-utils-bin"
+.SH NAME
+with-lock-ex \- file locker
+.SH SYNOPSIS
+.B with-lock-ex
+.RB [\| \-w \||\| \-q \||\| \-f \|]
+.I lockfile command 
+.IR args \ \|.\|.\|.
+.br
+.SH DESCRIPTION
+with-lock-ex will open and lock the lockfile for writing and then feed
+the remainder of its arguments to
+.BR exec (2);
+when that process terminates the fd will be closed and the file
+unlocked automatically by the kernel.
+.SH OPTIONS
+.TP
+.B \-w
+wait for the lock
+.TP
+.B \-f
+fail if the lock cannot be acquired
+.TP
+.B \-q
+silently do nothing if the lock cannot be acquired
+.SH AUTHOR
+This Manual page was written by Matthew Vernon <matthew@debian.org> but 
+may be used by anyone.
+.SH COPYRIGHT
+with-lock-ex was written by Ian Jackons <ian@chiark.greenend.org.uk>
+in 1993, 1994, 1995, 1996, 1998, 1999. He has placed it in the public
+domain.