Add truncate: to StandardOutput= etc.
This adds the ability to specify truncate:PATH for StandardOutput= and StandardError=, similar to the existing append:PATH. The code is mostly copied from the related append: code. Fixes #8983.
This commit is contained in:
committed by
Lennart Poettering
parent
e2ebc406ac
commit
8d7dab1fda
@@ -2383,8 +2383,8 @@ SystemCallErrorNumber=EPERM</programlisting>
|
||||
to. Takes one of <option>inherit</option>, <option>null</option>, <option>tty</option>,
|
||||
<option>journal</option>, <option>kmsg</option>, <option>journal+console</option>,
|
||||
<option>kmsg+console</option>, <option>file:<replaceable>path</replaceable></option>,
|
||||
<option>append:<replaceable>path</replaceable></option>, <option>socket</option> or
|
||||
<option>fd:<replaceable>name</replaceable></option>.</para>
|
||||
<option>append:<replaceable>path</replaceable></option>, <option>truncate:<replaceable>path</replaceable></option>,
|
||||
<option>socket</option> or <option>fd:<replaceable>name</replaceable></option>.</para>
|
||||
|
||||
<para><option>inherit</option> duplicates the file descriptor of standard input for standard output.</para>
|
||||
|
||||
@@ -2424,6 +2424,10 @@ SystemCallErrorNumber=EPERM</programlisting>
|
||||
<option>file:<replaceable>path</replaceable></option> above, but it opens the file in append mode.
|
||||
</para>
|
||||
|
||||
<para><option>truncate:<replaceable>path</replaceable></option> is similar to
|
||||
<option>file:<replaceable>path</replaceable></option> above, but it truncates the file when opening it.
|
||||
</para>
|
||||
|
||||
<para><option>socket</option> connects standard output to a socket acquired via socket activation. The
|
||||
semantics are similar to the same option of <varname>StandardInput=</varname>, see above.</para>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user