1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-24 21:34:08 +03:00

man: document that we now accept more than one main process for Type=oneshot services

This commit is contained in:
Lennart Poettering 2010-08-13 18:46:04 +02:00
parent 34e9ba669e
commit b1690fe70a

View File

@ -129,25 +129,27 @@
configured with configured with
<varname>ExecStart=</varname> is the <varname>ExecStart=</varname> is the
main process of the service. In this main process of the service. In this
mode, communication channels must be mode, if the process offers
installed before the daemon is started functionality to other processes on
up (e.g. sockets set up by systemd, the system its communication channels
via socket activation), as systemd should be installed before the daemon
will immediately proceed starting is started up (e.g. sockets set up by
follow-up units.</para> systemd, via socket activation), as
systemd will immediately proceed
starting follow-up units.</para>
<para>If set to <para>If set to
<option>forking</option> it is <option>forking</option> it is
expected that the process configured expected that the process configured
with <varname>ExecStart=</varname> with <varname>ExecStart=</varname>
will start up and call will call <function>fork()</function>
<function>fork()</function>. The as part of its start-up. The parent process is
parent process is expected to finish expected to exit when start-up is
when start-up is complete and all complete and all communication
communication channels set up. The channels set up. The child continues
child continues to run as the main to run as the main daemon
daemon process. This is the behaviour process. This is the behaviour of
of traditional UNIX daemons. If this traditional UNIX daemons. If this
setting is used, it is recommended to setting is used, it is recommended to
also use the also use the
<varname>PIDFile=</varname> option, so <varname>PIDFile=</varname> option, so
@ -176,7 +178,7 @@
will proceed starting follow-up units will proceed starting follow-up units
after the D-Bus bus name has been after the D-Bus bus name has been
acquired. Service units with this acquired. Service units with this
option configured implicitly have option configured implicitly gain
dependencies on the dependencies on the
<filename>dbus.target</filename> <filename>dbus.target</filename>
unit.</para> unit.</para>
@ -193,11 +195,11 @@
notification message has been sent. If notification message has been sent. If
this option is used this option is used
<varname>NotifyAccess=</varname> (see <varname>NotifyAccess=</varname> (see
below) must be set to open access to below) should be set to open access to
the notification socket provided by the notification socket provided by
systemd. If systemd. If
<varname>NotifyAccess=</varname> is not <varname>NotifyAccess=</varname> is not
set, it will be implicitly set to set, it will implicitly be set to
<option>main</option>.</para> <option>main</option>.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -250,21 +252,31 @@
arguments for the process. It is arguments for the process. It is
mandatory to set this option for all mandatory to set this option for all
services. This option may not be services. This option may not be
specified more than once. Optionally, specified more than once, except when
if the absolute file name is prefixed <varname>Type=oneshot</varname> is
with <literal>@</literal>, the second used in which case more than one
token will be passed as <varname>ExecStart=</varname> line is
accepted which are then invoked one by
one, sequentially in the order they
appear in the unit file.</para>
<para>Optionally, if the absolute file
name is prefixed with
<literal>@</literal>, the second token
will be passed as
<literal>argv[0]</literal> to the <literal>argv[0]</literal> to the
executed process, followed by the executed process, followed by the
further arguments specified. If the further arguments specified. If the
first token is prefixed with first token is prefixed with
<literal>-</literal> an error code of <literal>-</literal> an exit code of
the command normally considered a the command normally considered a
failure is ignored and considered failure (i.e. non-zero exit status or
success. If both <literal>-</literal> abormal exit due to signal) is ignored
and <literal>@</literal> are used for and considered success. If both
the same command the latter must <literal>-</literal> and
preceed the latter. Unless <literal>@</literal> are used for the
same command the former must preceed
the latter. Unless
<varname>Type=forking</varname> is <varname>Type=forking</varname> is
set, the process started via this set, the process started via this
command line will be considered the command line will be considered the