man: replace STDOUT with standard output, etc.

Actually 'STDOUT' is something that doesn't appear anywhere: in the
stdlib we have 'stdin', and there's only the constant STDOUT_FILENO,
so there's no reason to use capitals. When refering to code,
STDOUT/STDOUT/STDERR are replaced with stdin/stdout/stderr, and in
other places they are replaced with normal phrases like standard
output, etc.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2014-02-14 22:00:06 -05:00
parent bcddd5bf80
commit 6db2742802
15 changed files with 65 additions and 60 deletions

View file

@ -74,8 +74,8 @@
<orderedlist> <orderedlist>
<listitem><para>Close all open file <listitem><para>Close all open file
descriptors except STDIN, STDOUT, descriptors except stdin, stdout,
STDERR (i.e. the first three file stderr (i.e. the first three file
descriptors 0, 1, 2). This ensures descriptors 0, 1, 2). This ensures
that no accidentally passed file that no accidentally passed file
descriptor stays around in the daemon descriptor stays around in the daemon
@ -128,8 +128,8 @@
<listitem><para>In the daemon process, <listitem><para>In the daemon process,
connect <filename>/dev/null</filename> connect <filename>/dev/null</filename>
to STDIN, STDOUT, to standard input, output, and error.
STDERR.</para></listitem> </para></listitem>
<listitem><para>In the daemon process, <listitem><para>In the daemon process,
reset the umask to 0, so that the file reset the umask to 0, so that the file
@ -223,15 +223,16 @@
service.</para> service.</para>
<para>Note that new-style init systems <para>Note that new-style init systems
guarantee execution of daemon processes in guarantee execution of daemon processes in a
a clean process context: it is guaranteed that clean process context: it is guaranteed that
the environment block is sanitized, that the the environment block is sanitized, that the
signal handlers and mask is reset and that no signal handlers and mask is reset and that no
left-over file descriptors are passed. Daemons left-over file descriptors are passed. Daemons
will be executed in their own session, and will be executed in their own session, with
STDIN/STDOUT/STDERR connected to standard input/output/error connected to
<filename>/dev/null</filename> unless <filename>/dev/null</filename> unless
otherwise configured. The umask is reset.</para> otherwise configured. The umask is reset.
</para>
<para>It is recommended for new-style daemons <para>It is recommended for new-style daemons
to implement the following:</para> to implement the following:</para>
@ -324,7 +325,7 @@
<listitem><para>Instead of using the <listitem><para>Instead of using the
<function>syslog()</function> call to log directly to the <function>syslog()</function> call to log directly to the
system syslog service, a new-style daemon may system syslog service, a new-style daemon may
choose to simply log to STDERR via choose to simply log to standard error via
<function>fprintf()</function>, which is then forwarded to <function>fprintf()</function>, which is then forwarded to
syslog by the init system. If log syslog by the init system. If log
priorities are necessary, these can be priorities are necessary, these can be

View file

@ -96,7 +96,7 @@
#define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</programlisting> #define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</programlisting>
<para>These prefixes are intended to be used in <para>These prefixes are intended to be used in
conjunction with STDERR-based logging as implemented conjunction with stderr-based logging as implemented
by systemd. If a systemd service definition file is by systemd. If a systemd service definition file is
configured with <varname>StandardError=syslog</varname> configured with <varname>StandardError=syslog</varname>
or <varname>StandardError=kmsg</varname>, these or <varname>StandardError=kmsg</varname>, these

View file

@ -69,8 +69,8 @@
messages written to this file descriptor as simple messages written to this file descriptor as simple
newline-separated text strings are written to the newline-separated text strings are written to the
journal. This file descriptor can be used internally journal. This file descriptor can be used internally
by applications or be made STDOUT/STDERR of other by applications or be made standard output or standard
processes executed.</para> error of other processes executed.</para>
<para><function>sd_journal_stream_fd()</function> <para><function>sd_journal_stream_fd()</function>
takes a short program identifier string as first takes a short program identifier string as first

View file

@ -700,21 +700,23 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
<listitem> <listitem>
<para>Check whether any of the specified units are active <para>Check whether any of the specified units are active
(i.e. running). Returns an exit code 0 if at least one is (i.e. running). Returns an exit code
active, or non-zero otherwise. Unless <option>--quiet</option> <constant>0</constant> if at least one is active, or
is specified, this will also print the current unit state to non-zero otherwise. Unless <option>--quiet</option> is
STDOUT.</para> specified, this will also print the current unit state to
standard output.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><command>is-failed <replaceable>PATTERN</replaceable>...</command></term> <term><command>is-failed <replaceable>PATTERN</replaceable>...</command></term>
<listitem> <listitem>
<para>Check whether any of the specified units are in a "failed" state. <para>Check whether any of the specified units are in a
Returns an exit code 0 if at least one has failed, non-zero "failed" state. Returns an exit code
otherwise. Unless <option>--quiet</option> is specified, this <constant>0</constant> if at least one has failed,
will also print the current unit state to non-zero otherwise. Unless <option>--quiet</option> is
STDOUT.</para> specified, this will also print the current unit state to
standard output.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -1127,9 +1129,10 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
<listitem> <listitem>
<para>Create a snapshot. If a snapshot name is specified, <para>Create a snapshot. If a snapshot name is specified,
the new snapshot will be named after it. If none is the new snapshot will be named after it. If none is
specified, an automatic snapshot name is generated. In either specified, an automatic snapshot name is generated. In
case, the snapshot name used is printed to STDOUT, unless either case, the snapshot name used is printed to standard
<option>--quiet</option> is specified.</para> output, unless <option>--quiet</option> is specified.
</para>
<para>A snapshot refers to a saved state of the systemd <para>A snapshot refers to a saved state of the systemd
manager. It is implemented itself as a unit that is manager. It is implemented itself as a unit that is

View file

@ -60,7 +60,7 @@
used to query a system password or passphrase from the used to query a system password or passphrase from the
user, using a question message specified on the user, using a question message specified on the
command line. When run from a TTY it will query a command line. When run from a TTY it will query a
password on the TTY and print it to STDOUT. When run password on the TTY and print it to standard output. When run
with no TTY or with <option>--no-tty</option> it will with no TTY or with <option>--no-tty</option> it will
query the password system-wide and allow active users query the password system-wide and allow active users
to respond via several agents. The latter is to respond via several agents. The latter is

View file

@ -61,8 +61,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
<para><command>systemd-bus-proxyd</command> will proxy D-Bus <para><command>systemd-bus-proxyd</command> will proxy D-Bus
messages to and from a bus. The will be either the system bus or messages to and from a bus. The will be either the system bus or
the bus specified with <option>--address</option> when that option the bus specified with <option>--address</option> when that option
is given. Messages will be proxied to/from STDIN and STDOUT, or is given. Messages will be proxied to/from standard input and
the socket received through socket activation.</para> output, or the socket received through socket activation.</para>
<para>This program can be used to connect a program using classic <para>This program can be used to connect a program using classic
D-Bus to kdbus.</para> D-Bus to kdbus.</para>

View file

@ -60,18 +60,18 @@
<title>Description</title> <title>Description</title>
<para><command>systemd-cat</command> may be used to <para><command>systemd-cat</command> may be used to
connect STDOUT and STDERR of a process with the connect the standard input and output of a process to the
journal, or as a filter tool in a shell pipeline to journal, or as a filter tool in a shell pipeline to
pass the output the previous pipeline element pass the output the previous pipeline element
generates to the journal.</para> generates to the journal.</para>
<para>If no parameter is passed, <para>If no parameter is passed,
<command>systemd-cat</command> will write <command>systemd-cat</command> will write
everything it reads from standard input (STDIN) to the journal.</para> everything it reads from standard input (stdin) to the journal.</para>
<para>If parameters are passed, they are executed as <para>If parameters are passed, they are executed as
command line with standard output (STDOUT) and standard command line with standard output (stdout) and standard
error output (STDERR) connected to the journal, so error output (stderr) connected to the journal, so
that all it writes is stored in the journal.</para> that all it writes is stored in the journal.</para>
</refsect1> </refsect1>
@ -169,7 +169,7 @@
<title>Invoke a program</title> <title>Invoke a program</title>
<para>This calls <filename noindex='true'>/bin/ls</filename> <para>This calls <filename noindex='true'>/bin/ls</filename>
with STDOUT/STDERR connected to the with standard output and error connected to the
journal:</para> journal:</para>
<programlisting># systemd-cat ls</programlisting> <programlisting># systemd-cat ls</programlisting>
@ -188,8 +188,8 @@
<para>Even though the two examples have very similar <para>Even though the two examples have very similar
effects the first is preferable since only one process effects the first is preferable since only one process
is running at a time, and both STDOUT and STDERR are is running at a time, and both stdout and stderr are
captured while in the second example only STDOUT is captured while in the second example only stdout is
captured.</para> captured.</para>
</refsect1> </refsect1>

View file

@ -135,8 +135,8 @@
<listitem><para>Extract the last coredump <listitem><para>Extract the last coredump
matching specified characteristics. matching specified characteristics.
Coredump will be written on STDOUT, unless Coredump will be written on standard output,
an output file is specified with unless an output file is specified with
<option>-o/--output</option>. <option>-o/--output</option>.
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>

View file

@ -59,15 +59,15 @@
<title>Description</title> <title>Description</title>
<para><filename>systemd-journald</filename> is a <para><filename>systemd-journald</filename> is a
system service that collects and stores logging system service that collects and stores logging data.
data. It creates and maintains structured, indexed It creates and maintains structured, indexed journals
journals based on logging information that is received based on logging information that is received from the
from the kernel, from user processes via the libc kernel, from user processes via the libc
<citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry> <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
call, from STDOUT/STDERR of system services or via its call, from standard input and standard error of system
native API. It will implicitly collect numerous meta services or via its native API. It will implicitly
data fields for each log messages in a secure and collect numerous meta data fields for each log
unfakeable way. See messages in a secure and unfakeable way. See
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry> <citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>
for more information about the collected meta data. for more information about the collected meta data.
</para> </para>

View file

@ -70,7 +70,7 @@
<varlistentry> <varlistentry>
<term><option>--debug</option></term> <term><option>--debug</option></term>
<listitem> <listitem>
<para>Print debug messages to STDERR.</para> <para>Print debug messages to standard error.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -82,10 +82,11 @@
<varlistentry> <varlistentry>
<term><option>--exec-delay=</option></term> <term><option>--exec-delay=</option></term>
<listitem> <listitem>
<para>Delay the execution of RUN instruction by the given <para>Delay the execution of <varname>RUN</varname>
number of seconds. This option might be useful when instruction by the given number of seconds. This option
debugging system crashes during coldplug caused by loading might be useful when debugging system crashes during
non-working kernel modules.</para> coldplug caused by loading non-working kernel
modules.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>

View file

@ -472,9 +472,9 @@
<varlistentry> <varlistentry>
<term><varname>StandardError=</varname></term> <term><varname>StandardError=</varname></term>
<listitem><para>Controls where file <listitem><para>Controls where file
descriptor 2 (STDERR) of the executed descriptor 2 (standard error) of the
processes is connected to. The executed processes is connected to.
available options are identical to The available options are identical to
those of those of
<varname>StandardOutput=</varname>, <varname>StandardOutput=</varname>,
with one exception: if set to with one exception: if set to
@ -491,8 +491,8 @@
<varlistentry> <varlistentry>
<term><varname>TTYPath=</varname></term> <term><varname>TTYPath=</varname></term>
<listitem><para>Sets the terminal <listitem><para>Sets the terminal
device node to use if STDIN, STDOUT, device node to use if standard input, output,
or STDERR are connected to a or error are connected to a
TTY (see above). Defaults to TTY (see above). Defaults to
<filename>/dev/console</filename>.</para></listitem> <filename>/dev/console</filename>.</para></listitem>
</varlistentry> </varlistentry>

View file

@ -861,7 +861,7 @@ ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
for all file descriptors passed via for all file descriptors passed via
socket-based activation. If true, all socket-based activation. If true, all
file descriptors >= 3 (i.e. all except file descriptors >= 3 (i.e. all except
STDIN/STDOUT/STDERR) will have stdin, stdout, and stderr) will have
the <constant>O_NONBLOCK</constant> flag the <constant>O_NONBLOCK</constant> flag
set and hence are in set and hence are in
non-blocking mode. This option is only non-blocking mode. This option is only

View file

@ -144,8 +144,8 @@
<citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry> <citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>
for details) or via the traditional for details) or via the traditional
<citerefentry><refentrytitle>inetd</refentrytitle><manvolnum>8</manvolnum></citerefentry>-style <citerefentry><refentrytitle>inetd</refentrytitle><manvolnum>8</manvolnum></citerefentry>-style
socket passing (i.e. sockets passed in via STDIN and socket passing (i.e. sockets passed in via standard input and
STDOUT, using <varname>StandardInput=socket</varname> output, using <varname>StandardInput=socket</varname>
in the service file).</para> in the service file).</para>
</refsect1> </refsect1>

View file

@ -255,7 +255,7 @@
<para>Execute a program to determine whether there <para>Execute a program to determine whether there
is a match; the key is true if the program returns is a match; the key is true if the program returns
successfully. The device properties are made available to the successfully. The device properties are made available to the
executed program in the environment. The program's STDOUT executed program in the environment. The program's standard ouput
is available in the <varname>RESULT</varname> key.</para> is available in the <varname>RESULT</varname> key.</para>
<para>This can only be used for very short-running foreground tasks. For details, <para>This can only be used for very short-running foreground tasks. For details,
see <varname>RUN</varname>.</para> see <varname>RUN</varname>.</para>

View file

@ -72,7 +72,7 @@
<varlistentry> <varlistentry>
<term><option>--debug</option></term> <term><option>--debug</option></term>
<listitem> <listitem>
<para>Print debug messages to STDERR.</para> <para>Print debug messages to standard error.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>