aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-12-09 15:48:09 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2009-12-09 15:48:09 +0200
commit41c55a1a93840363c996fc9aae54329dadcf0a86 (patch)
tree737d4789555e44ee1dc7356ae1edcad54cdee623
parentb63563c9c5271d088d80a31f780be74d1c16fef4 (diff)
downloadpies-41c55a1a93840363c996fc9aae54329dadcf0a86.tar.gz
pies-41c55a1a93840363c996fc9aae54329dadcf0a86.tar.bz2
Improve docs.
* doc/fix-sentence-spacing.sed: New file. * doc/Makefile.am (EXTRA_DIST): Add fix-sentence-spacing.sed. (check-tabs, check-sentence-spacing) (fix-sentence-spacing): New rules. (check-format): Rewrite rule. * doc/pies.texi: Update.
-rw-r--r--doc/Makefile.am22
-rw-r--r--doc/fix-sentence-spacing.sed4
-rw-r--r--doc/pies.texi113
3 files changed, 106 insertions, 33 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 6d47f51..73bd72a 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -23,6 +23,7 @@ pies_TEXINFOS=\
23 23
24EXTRA_DIST = \ 24EXTRA_DIST = \
25 check-docs.sh\ 25 check-docs.sh\
26 fix-sentence-spacing.sed\
26 gendocs_template\ 27 gendocs_template\
27 mastermenu.el\ 28 mastermenu.el\
28 untabify.el 29 untabify.el
@@ -31,12 +32,20 @@ clean-local:
31 @rm -rf manual 32 @rm -rf manual
32 33
33# Checking 34# Checking
34check-format: 35check-tabs:
35 @if test -n "`cat $(info_TEXINFOS) $(pies_TEXINFOS) | tr -d -c '\t'`"; then \ 36 @if test -n "`cat $(info_TEXINFOS) $(pies_TEXINFOS) | tr -d -c '\t'`"; then \
36 echo "Sources contain tabs; run make untabify"; \ 37 echo "Sources contain tabs; run make untabify"; \
37 false; \ 38 false; \
38 fi 39 fi
39 40
41check-sentence-spacing:
42 @if cat $(info_TEXINFOS) $(pies_TEXINFOS) | sed 's/i\.e\. //g;s/e\.g\. //g;s/\.\.\. @//g' | grep -q '\. [@A-Z]'; then \
43 echo >&2 "Sources contain single-space sentence separators"; \
44 echo >&2 "Run make fix-sentence-spacing to fix"; \
45 fi
46
47check-format: check-tabs check-sentence-spacing
48
40check-options: 49check-options:
41 @check-docs.sh options \ 50 @check-docs.sh options \
42 '/argp_option options\[\] = /,/^}/s/[ \t]*{ *"\([^,"]*\)".*/\1/pg' \ 51 '/argp_option options\[\] = /,/^}/s/[ \t]*{ *"\([^,"]*\)".*/\1/pg' \
@@ -130,7 +139,16 @@ master-menu:
130untabify: 139untabify:
131 @emacs -batch -l untabify.el $(info_TEXINFOS) $(pies_TEXINFOS) 140 @emacs -batch -l untabify.el $(info_TEXINFOS) $(pies_TEXINFOS)
132 141
133final: untabify master-menu 142fix-sentence-spacing:
143 for file in $(info_TEXINFOS) $(wydawca_TEXINFOS); \
144 do \
145 if grep -q '\. [@A-Z]' $$file; then \
146 mv $$file $${file}~; \
147 sed -r 's/\. ([@A-Z])/. \1/g' $${file}~ > $$file; \
148 fi; \
149 done
150
151final: untabify fix-sentence-spacing master-menu
134 152
135# The rendering level is one of PUBLISH, DISTRIB or PROOF. 153# The rendering level is one of PUBLISH, DISTRIB or PROOF.
136# Just call `make RENDITION=PROOF [target]' if you want PROOF rendition. 154# Just call `make RENDITION=PROOF [target]' if you want PROOF rendition.
diff --git a/doc/fix-sentence-spacing.sed b/doc/fix-sentence-spacing.sed
new file mode 100644
index 0000000..906a670
--- /dev/null
+++ b/doc/fix-sentence-spacing.sed
@@ -0,0 +1,4 @@
1s/\. ([@A-Z])/. \1/g
2s/e\.g\. /e.g. /g
3s/i\.e\. /i.e. /g
4s/\.\.\. @\}/... @}/g
diff --git a/doc/pies.texi b/doc/pies.texi
index 96cbfb5..e21ea62 100644
--- a/doc/pies.texi
+++ b/doc/pies.texi
@@ -312,7 +312,7 @@ directives any time by running @command{pies --config-help}.
312 The configuration file consists of statements and comments. 312 The configuration file consists of statements and comments.
313 313
314 There are three classes of lexical tokens: keywords, values, and 314 There are three classes of lexical tokens: keywords, values, and
315separators. Blanks, tabs, newlines and comments, collectively called 315separators. Blanks, tabs, newlines and comments, collectively called
316@dfn{white space} are ignored except as they serve to separate 316@dfn{white space} are ignored except as they serve to separate
317tokens. Some white space is required to separate otherwise adjacent 317tokens. Some white space is required to separate otherwise adjacent
318keywords and values. 318keywords and values.
@@ -649,20 +649,20 @@ disabled by @command{pies}, even if they respawn too fast.
649This flag is valid only for @samp{inetd} components. It has the same 649This flag is valid only for @samp{inetd} components. It has the same
650meaning as @samp{wait} in @file{inetd.conf} file, i.e. it tells 650meaning as @samp{wait} in @file{inetd.conf} file, i.e. it tells
651@command{pies} to wait for the server program to 651@command{pies} to wait for the server program to
652return. @FIXME-xref{inetd}. 652return. @FIXME-xref{inetd}.
653 653
654@item tcpmux 654@item tcpmux
655This is a @acronym{TCPMUX} component. @FIXME-xref{tcpmux}. 655This is a @acronym{TCPMUX} component. @xref{TCPMUX}.
656 656
657@item tcpmuxplus 657@item tcpmuxplus
658This is a @acronym{TCPMUX+} component. @FIXME-xref{tcpmux}. 658This is a @acronym{TCPMUX+} component. @xref{TCPMUX}.
659 659
660@item internal 660@item internal
661This is an internal inetd component. @FIXME-xref{internal inetd}. 661This is an internal inetd component. @xref{builtin}.
662 662
663@item sockenv 663@item sockenv
664This inetd component wants socket description variables in its 664This inetd component wants socket description variables in its
665environment. @FIXME-xref{sockenv}. 665environment. @FIXME-xref{sockenv}.
666 666
667@item resolve 667@item resolve
668When used with @samp{sockenv}, the @env{LOCALHOST} and 668When used with @samp{sockenv}, the @env{LOCALHOST} and
@@ -831,6 +831,11 @@ before assignment.
831@end table 831@end table
832@end deffn 832@end deffn
833 833
834@deffn {Config: component} max-instances @var{n}
835Sets the maximum number of simultaneously running instances of this
836component.
837@end deffn
838
834@node Actions Before Startup 839@node Actions Before Startup
835@subsection Actions Before Startup 840@subsection Actions Before Startup
836 841
@@ -1023,19 +1028,23 @@ statement. You must also declare a socket to listen on.
1023Define a socket to listen on. Allowed values for @var{url} are: 1028Define a socket to listen on. Allowed values for @var{url} are:
1024 1029
1025@table @asis 1030@table @asis
1026@item file name 1031@flindex /etc/protocols
1027Specifies a @acronym{UNIX} socket file name. You may use a relative 1032@item inet[+@var{proto}]://@var{ip}:@var{port}
1028file name, provided that @code{chdir} statement is used for this 1033Listen on IPv4@footnote{Support for IPv6 will be added in future
1029component (@pxref{Actions Before Startup, chdir}). 1034versions.}. address @var{ip} (may be given as a symbolic host name),
1030 1035on port @var{port}. Optional @var{proto} defines the protocol
1031@item local://@var{file}[;@var{args}] 1036to use. It must be a valid protocol name as given in
1032@itemx file://@var{file}[;@var{args}] 1037@file{/etc/protocols}. Default is @samp{tcp}.
1033@itemx unix://@var{file}[;@var{args}] 1038
1039@item local[+@var{proto}]://@var{file}[;@var{args}]
1040@itemx file[+@var{proto}]://@var{file}[;@var{args}]
1041@itemx unix[+@var{proto}]://@var{file}[;@var{args}]
1034Listen on the @acronym{UNIX} socket file @var{file}, which is either 1042Listen on the @acronym{UNIX} socket file @var{file}, which is either
1035an absolute or relative file name, as described above. Optional 1043an absolute or relative file name, as described above. The
1036arguments @var{args} control ownership and file mode of @var{file}. They 1044@var{proto} part is as described above. Optional arguments, @var{args},
1037are a list of assignments, separated by semicolons. The following 1045control ownership and file mode of @var{file}. They are a list of
1038values are allowed: 1046assignments, separated by semicolons. The following values are
1047allowed:
1039 1048
1040@table @asis 1049@table @asis
1041@item user 1050@item user
@@ -1058,15 +1067,57 @@ For example:
1058socket "unix:/var/run/socket;user=nobody;group=mail;mode=770"; 1067socket "unix:/var/run/socket;user=nobody;group=mail;mode=770";
1059@end smallexample 1068@end smallexample
1060 1069
1061@item inet://@var{ip}:@var{port} 1070@item file name
1062Listen on IPv4 address @var{ip} (may be given as a symbolic host name), 1071Specifies a @acronym{UNIX} socket file name. It is a shortcut for
1063on port @var{port}. 1072@samp{unix:@var{file-name}}. You may use a relative file name,
1073provided that @code{chdir} statement is used for this component
1074(@pxref{Actions Before Startup, chdir}).
1064@end table 1075@end table
1076@end deffn
1077
1078@deffn {Config: component} socket-type @var{type}
1079Sets the socket type. Allowed values for @var{type} are:
1080@samp{stream}, @samp{dgram}, @samp{raw}, @samp{rdm},
1081@samp{seqpacket}. Default is @samp{stream}. Notice that
1082some socket types may not be implemented by all protocol
1083families, e.g. @samp{seqpacket} is not implemented for
1084@samp{inet}.
1085@end deffn
1086
1087@anchor{max-rate}
1088@deffn {Config: component} max-rate @var{n}
1089Specifies the maximum number of times the component can be invoked in
1090one minute; the default is unlimited. A rate of @samp{0} stands for
1091@samp{unlimited}.
1092@end deffn
1093
1094@deffn {Config: component} max-instances @var{n}
1095Sets the maximum number of simultaneously running instances of this
1096component. It is equivalent to the maximum number of simultaneously
1097opened connections.
1098@end deffn
1099
1100@menu
1101* builtin:: Built-in Inetd Services
1102* TCPMUX:: TCPMUX Services
1103@end menu
1104
1105@node builtin
1106@subsubsection Built-in Inetd Services
1107@cindex builtin services
1108@WRITEME
1109
1110@node TCPMUX
1111@subsubsection TCPMUX Services
1112@cindex TCPMUX
1113@UNREVISED
1114
1115@deffn {Config: component} service @var{name}
1116Sets the name of the service for TCPMUX sub-services.
1117@end deffn
1065 1118
1066Notice, that @command{pies} version @value{VERSION} handles only 1119@deffn {Config: component} tcpmux-master @var{name}
1067@acronym{TCP} sockets and only IPv4 addresses. Support for IPv6 will 1120Sets the name of the master TCPMUX service.
1068be added in future versions. Support for @acronym{UDP} sockets will
1069be added if there is a demand.
1070@end deffn 1121@end deffn
1071 1122
1072@node Meta1-Style Components 1123@node Meta1-Style Components
@@ -1738,7 +1789,7 @@ return-code (EX_USAGE, EX_CONFIG) @{
1738 1789
1739 Component "$@{component@}" has terminated with code $@{retcode@}, 1790 Component "$@{component@}" has terminated with code $@{retcode@},
1740 which means it encountered some configuration problem. 1791 which means it encountered some configuration problem.
1741 I will not restart it automatically. Please fix its configuration 1792 I will not restart it automatically. Please fix its configuration
1742 and restart it manually at your earliest convenience. 1793 and restart it manually at your earliest convenience.
1743 1794
1744 To restart, run ``$@{program-name@} -R $@{component@}''