]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man: document new --exec switch for systemd-notify
authorLennart Poettering <lennart@poettering.net>
Thu, 16 Feb 2023 15:30:09 +0000 (16:30 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 17 Feb 2023 08:55:35 +0000 (09:55 +0100)
man/systemd-notify.xml

index dd76cc0fb6608b1ecad51bad5256014520d08292..5a154686f5f7b305ca9676db8c5de55720a70eef 100644 (file)
@@ -25,6 +25,9 @@
     <cmdsynopsis>
       <command>systemd-notify <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="opt" rep="repeat">VARIABLE=VALUE</arg></command>
     </cmdsynopsis>
+    <cmdsynopsis>
+      <command>systemd-notify --exec <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="opt" rep="repeat">VARIABLE=VALUE</arg> ; <arg rep="repeat">CMDLINE</arg></command>
+    </cmdsynopsis>
   </refsynopsisdiv>
 
   <refsect1>
         this option set is prone to race conditions in all other cases.</para></listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term><option>--exec</option></term>
+
+        <listitem><para>If specified <command>systemd-notify</command> will execute another command line
+        after it completed its operation, replacing its own process. If used, the list of assignments to
+        include in the message sent must be followed by a <literal>;</literal> character (as separate
+        argument), followed by the command line to execute. This permits "chaining" of commands, i.e. issuing
+        one operation, followed immediately by another, without changing PIDs.</para>
+
+        <para>Note that many shells interpret <literal>;</literal> as their own separator for command lines,
+        hence when <command>systemd-notify</command> is invoked from a shell the semicolon must usually be
+        escaped as <literal>\;</literal>.</para></listitem>
+      </varlistentry>
+
       <xi:include href="standard-options.xml" xpointer="help" />
       <xi:include href="standard-options.xml" xpointer="version" />
     </variablelist>