INN commit: trunk (5 files)
INN Commit
Russ_Allbery at isc.org
Mon Nov 17 18:56:25 UTC 2008
Date: Monday, November 17, 2008 @ 10:56:24
Author: iulius
Revision: 8168
Convert documentation for shlock into POD.
Added:
trunk/doc/pod/shlock.pod
Modified:
trunk/MANIFEST
trunk/doc/man/ (properties)
trunk/doc/pod/Makefile
Deleted:
trunk/doc/man/shlock.1
--------------------+
MANIFEST | 1
doc/man/shlock.1 | 82 ---------------------------------------------------
doc/pod/Makefile | 3 +
doc/pod/shlock.pod | 75 ++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 78 insertions(+), 83 deletions(-)
Modified: MANIFEST
===================================================================
--- MANIFEST 2008-11-17 18:49:01 UTC (rev 8167)
+++ MANIFEST 2008-11-17 18:56:24 UTC (rev 8168)
@@ -320,6 +320,7 @@
doc/pod/rnews.pod Master file for rnews.1
doc/pod/scanlogs.pod Master file for scanlogs.8
doc/pod/sendinpaths.pod Master file for sendinpaths.8
+doc/pod/shlock.pod Master file for shlock.1
doc/pod/simpleftp.pod Master file for simpleftp.1
doc/pod/sm.pod Master file for sm.1
doc/pod/storage.conf.pod Master file for storage.conf.5
Property changes on: trunk/doc/man
___________________________________________________________________
Modified: svn:ignore
- active.5
active.times.5
actsync.8
archive.8
auth_krb5.8
auth_smb.8
batcher.8
buffchan.8
buffindexed.conf.5
ckpasswd.8
control.ctl.5
convdate.1
ctlinnd.8
cycbuff.conf.5
distrib.pats.5
distributions.5
docheckgroups.8
domain.8
expire.ctl.5
expireover.8
fastrm.1
getlist.1
grephistory.1
ident.8
inews.1
inn.conf.5
INN__Config.3pm
innbind.8
innconfval.1
innd.8
inndf.8
innmail.1
innupgrade.8
libauth.3
libinnhist.3
list.3
mailpost.8
makehistory.8
moderators.5
motd.news.5
newsfeeds.5
news.daily.8
newslog.5
newsgroups.5
ninpaths.8
nnrpd.8
ovdb.5
ovdb_init.8
ovdb_monitor.8
ovdb_server.8
ovdb_stat.8
overchan.8
passwd.nntp.5
perl-nocem.8
pgpverify.1
pullnews.1
qio.3
radius.8
radius.conf.5
rc.news.8
readers.conf.5
rnews.1
sasl.conf.5
scanlogs.8
send-uucp.8
sendinpaths.8
simpleftp.1
sm.1
storage.conf.5
subscriptions.5
tally.control.8
tdx-util.8
tinyleaf.8
tst.3
uwildmat.3
+ active.5
active.times.5
actsync.8
archive.8
auth_krb5.8
auth_smb.8
batcher.8
buffchan.8
buffindexed.conf.5
ckpasswd.8
control.ctl.5
convdate.1
ctlinnd.8
cycbuff.conf.5
distrib.pats.5
distributions.5
docheckgroups.8
domain.8
expire.ctl.5
expireover.8
fastrm.1
getlist.1
grephistory.1
ident.8
inews.1
inn.conf.5
INN__Config.3pm
innbind.8
innconfval.1
innd.8
inndf.8
innmail.1
innupgrade.8
libauth.3
libinnhist.3
list.3
mailpost.8
makehistory.8
moderators.5
motd.news.5
newsfeeds.5
news.daily.8
newslog.5
newsgroups.5
ninpaths.8
nnrpd.8
ovdb.5
ovdb_init.8
ovdb_monitor.8
ovdb_server.8
ovdb_stat.8
overchan.8
passwd.nntp.5
perl-nocem.8
pgpverify.1
pullnews.1
qio.3
radius.8
radius.conf.5
rc.news.8
readers.conf.5
rnews.1
sasl.conf.5
scanlogs.8
send-uucp.8
sendinpaths.8
shlock.1
simpleftp.1
sm.1
storage.conf.5
subscriptions.5
tally.control.8
tdx-util.8
tinyleaf.8
tst.3
uwildmat.3
Deleted: doc/man/shlock.1
===================================================================
--- doc/man/shlock.1 2008-11-17 18:49:01 UTC (rev 8167)
+++ doc/man/shlock.1 2008-11-17 18:56:24 UTC (rev 8168)
@@ -1,82 +0,0 @@
-.\" $Revision$
-.TH SHLOCK 1
-.SH NAME
-shlock \- create lock files for use in shell scripts
-.SH SYNOPSIS
-.B shlock
-.BI \-p " pid"
-.BI \-f " name"
-[
-.B \-b
-]
-[
-.B \-u
-]
-[
-.B \-c
-]
-.SH DESCRIPTION
-.I Shlock
-tries to create a lock file named
-.I name
-and write the process ID
-.I pid
-into it.
-If the file already exists,
-.I shlock
-will read the process ID from the file and test to see if the process
-is currently running.
-If the process exists, then the file will not be created.
-.PP
-.I Shlock
-exits with a zero status if it was able to create the lock file, or
-non-zero if the file refers to currently-active process.
-.SH OPTIONS
-.TP
-.B \-b
-Process IDs are normally read and written in ASCII.
-If the ``\-b'' flag is used, then they will be written as a binary
-.IR int .
-For compatibility with other systems, the ``\-u'' flag is accepted as
-a synonym for ``\-b'' since binary locks are used by many UUCP packages.
-.TP
-.B \-c
-If the ``\-c'' flag is used, then
-.I shlock
-will not create a lock file, but will instead use the file to see if
-the lock is held by another program.
-If the lock is valid, the program will exit with a non-zero status; if
-the lock is not valid (i.e., invoking
-.I shlock
-without the flag would have succeeded), then the program will exit
-with a zero status.
-.SH EXAMPLES
-The following example shows how
-.I shlock
-would be used within a shell script:
-.RS
-.nf
-LOCK=<pathrun in inn.conf>/LOCK.send
-trap 'rm -f ${LOCK} ; exit 1' 1 2 3 15
-if shlock -p $$ -f ${LOCK} ; then
- # Do appropriate work
-else
- echo Locked by `cat ${LOCK}`
-f\&i
-.fi
-.RE
-.SH BUGS
-.I shlock
-assumes that it will not be used in an environment with multiple
-locks/unlocks in a short time (due to a race condition). That is,
-.I shlock
-is intended for daily or hourly jobs.
-.SH HISTORY
-Written by Rich $alz <rsalz at uunet.uu.net> after a description of HDB UUCP
-locking given by Peter Honeyman.
-.de R$
-This is revision \\$3, dated \\$4.
-..
-.R$ $Id$
-.SH "SEE ALSO"
-inn.conf(5)
Modified: doc/pod/Makefile
===================================================================
--- doc/pod/Makefile 2008-11-17 18:49:01 UTC (rev 8167)
+++ doc/pod/Makefile 2008-11-17 18:56:24 UTC (rev 8168)
@@ -13,7 +13,7 @@
MAN1 = ../man/convdate.1 ../man/fastrm.1 ../man/getlist.1 \
../man/grephistory.1 ../man/inews.1 ../man/innconfval.1 \
../man/innmail.1 ../man/pullnews.1 ../man/rnews.1 \
- ../man/simpleftp.1 ../man/sm.1
+ ../man/shlock.1 ../man/simpleftp.1 ../man/sm.1
MAN3 = ../man/libauth.3 ../man/libinnhist.3 ../man/list.3 ../man/qio.3 \
../man/tst.3 ../man/uwildmat.3
@@ -66,6 +66,7 @@
../man/innmail.1: innmail.pod ; $(POD2MAN) -s 1 $? > $@
../man/pullnews.1: pullnews.pod ; $(POD2MAN) -s 1 $? > $@
../man/rnews.1: rnews.pod ; $(POD2MAN) -s 1 $? > $@
+../man/shlock.1: shlock.pod ; $(POD2MAN) -s 1 $? > $@
../man/simpleftp.1: simpleftp.pod ; $(POD2MAN) -s 1 $? > $@
../man/sm.1: sm.pod ; $(POD2MAN) -s 1 $? > $@
Added: doc/pod/shlock.pod
===================================================================
--- doc/pod/shlock.pod (rev 0)
+++ doc/pod/shlock.pod 2008-11-17 18:56:24 UTC (rev 8168)
@@ -0,0 +1,75 @@
+=head1 NAME
+
+shlock - Create lock files for use in shell scripts
+
+=head1 SYNOPSIS
+
+B<shlock> [B<-b>|B<-c>|B<-u>] B<-f> I<name> B<-p> I<pid>
+
+=head1 DESCRIPTION
+
+B<shlock> tries to create a lock file named I<name> and write
+the process ID I<pid> into it. If the file already exists, B<shlock>
+will read the process ID from the file and test to see whether
+the process is currently running. If the process exists, then the file
+will not be created. I<shlock> exits with a zero status if it could
+create the lock file, or non-zero if the file refers to a currently
+active process.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-b>
+
+Process IDs are normally read and written in ASCII. If the B<-b> flag
+is used, then they will be written as a binary int.
+
+=item B<-c>
+
+If the B<-c> flag is used, then B<shlock> will not create a lock file,
+but will instead use the file to see if the lock is held by another program.
+If the lock is valid, the program will exit with a non-zero status;
+if the lock is not valid (i.e. invoking B<shlock> without the flag would
+have succeeded), then the program will exit with a zero status.
+
+=item B<-f> I<name>
+
+I<name> is the name of the lock file B<shlock> attempts to create.
+If the file already exists, it will read the process ID from the file
+and exit with a non-zero status if this process is currently active.
+
+=item B<-p> I<pid>
+
+I<pid> is the process ID to write into the file I<name>.
+
+=item B<-u>
+
+For compatibility with other systems, the B<-u> flag is accepted
+as a synonym for B<-b> since binary locks are used by many UUCP packages.
+
+=back
+
+=head1 EXAMPLES
+
+The following example shows how B<shlock> would be used within
+a shell script:
+
+ LOCK=<pathrun in inn.conf>/LOCK.send
+ trap 'rm -f ${LOCK} ; exit 1' 1 2 3 15
+ if shlock -p $$ -f ${LOCK} ; then
+ # Do appropriate work.
+ else
+ echo "Locked by `cat ${LOCK}`"
+ fi
+
+=head1 HISTORY
+
+Written by Rich $alz <rsalz at uunet.uu.net> for InterNetNews after
+a description of HDB UUCP locking given by Peter Honeyman, and
+improved by Berend Reitsma to solve a race condition.
+Converted to POD by Julien Elie <julien at trigofacile.com>.
+
+$Id$
+
+=cut
Property changes on: trunk/doc/pod/shlock.pod
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
More information about the inn-committers
mailing list