From ecfa85e9e18e25887a6fdaaa9ec3e7aa0cba7f68 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Wed, 8 Dec 2021 12:56:36 +0100 Subject: docs: Clarify that the fd store is discarded when a service is stopped --- man/sd_notify.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'man/sd_notify.xml') diff --git a/man/sd_notify.xml b/man/sd_notify.xml index 69e1b024ad..4a0a7b34dc 100644 --- a/man/sd_notify.xml +++ b/man/sd_notify.xml @@ -218,7 +218,7 @@ Stores additional file descriptors in the service manager. File descriptors sent this way will be maintained per-service by the service manager and will later be handed back using the usual file descriptor - passing logic at the next invocation of the service, see + passing logic at the next invocation of the service (e.g. when it is restarted), see sd_listen_fds3. 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 @@ -232,7 +232,8 @@ EPOLLHUP or EPOLLERR event seen on them will result in their automatic removal from the store. Multiple arrays of file descriptors may be sent in separate messages, in which case the arrays are combined. Note that the service manager removes duplicate (pointing to the same - object) file descriptors before passing them to the service. Use sd_pid_notify_with_fds() + object) file descriptors before passing them to the service. When a service is stopped, its file descriptor + store is discarded and all file descriptors in it are closed. Use sd_pid_notify_with_fds() to send messages with FDSTORE=1, see below. -- cgit v1.2.1