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)
--- /dev/null
+.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.