summaryrefslogtreecommitdiffstats
path: root/man/systemd.service.xml
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-06-20 23:30:30 +0200
committerLennart Poettering <lennart@poettering.net>2017-06-26 15:14:41 +0200
commit3ceb72e5582948cd81fa7018716c67ac7f17905e (patch)
tree219ba2207c2120ea9803cd429720dc57ebd24431 /man/systemd.service.xml
parenthwdb: Add ID_INPUT_JOYSTICK_INTEGRATION property (#5413) (diff)
downloadsystemd-3ceb72e5582948cd81fa7018716c67ac7f17905e.tar.xz
systemd-3ceb72e5582948cd81fa7018716c67ac7f17905e.zip
core: permit FDSTORE=1 messages with non-pollable fds
This also alters the documentation to recommend memfds rather than /run for serializing state across reboots. That's because /run doesn't actually have the same lifecycle as the fd store, as it is cleared out on restarts. Fixes: #5606
Diffstat (limited to 'man/systemd.service.xml')
-rw-r--r--man/systemd.service.xml25
1 files changed, 11 insertions, 14 deletions
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
index 95c16fded7..1faac0f762 100644
--- a/man/systemd.service.xml
+++ b/man/systemd.service.xml
@@ -853,21 +853,18 @@
<varlistentry>
<term><varname>FileDescriptorStoreMax=</varname></term>
- <listitem><para>Configure how many file descriptors may be
- stored in the service manager for the service using
+ <listitem><para>Configure how many file descriptors may be stored in the service manager for the service using
<citerefentry><refentrytitle>sd_pid_notify_with_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>'s
- <literal>FDSTORE=1</literal> messages. This is useful for
- implementing service restart schemes where the state is
- serialized to <filename>/run</filename> and the file
- descriptors passed to the service manager, to allow restarts
- without losing state. Defaults to 0, i.e. no file descriptors
- may be stored in the service manager. All file
- descriptors passed to the service manager from a specific
- service are passed back to the service's main process on the
- next service restart. Any file descriptors passed to the
- service manager are automatically closed when POLLHUP or
- POLLERR is seen on them, or when the service is fully stopped
- and no job is queued or being executed for it.</para></listitem>
+ <literal>FDSTORE=1</literal> messages. This is useful for implementing services that can restart after an
+ explicit request or a crash without losing state. Any open sockets and other file descriptors which should not
+ be closed during the restart may be stored this way. Application state can either be serialized to a file in
+ <filename>/run</filename>, or better, stored in a
+ <citerefentry><refentrytitle>memfd_create</refentrytitle><manvolnum>2</manvolnum></citerefentry> memory file
+ descriptor. Defaults to 0, i.e. no file descriptors may be stored in the service manager. All file descriptors
+ passed to the service manager from a specific service are passed back to the service's main process on the next
+ service restart. Any file descriptors passed to the service manager are automatically closed when
+ <constant>POLLHUP</constant> or <constant>POLLERR</constant> is seen on them, or when the service is fully
+ stopped and no job is queued or being executed for it.</para></listitem>
</varlistentry>
<varlistentry>