From: Lennart Poettering Date: Mon, 13 Nov 2017 17:26:04 +0000 (+0100) Subject: core: add a new sd_notify() message for removing fds from the FD store again X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=39a1d713da4a5c60c88d97b864f01622e83a63ca;p=elogind.git core: add a new sd_notify() message for removing fds from the FD store again Currenly the only way to remove fds from the fdstore is to fully stop the service, or to somehow trigger POLLERR/POLLHUP on the fd, in which case elogind will remove the fd automatically. Let's add another way: a new message that can be sent to remove fds explicitly, given their name. --- diff --git a/man/sd_notify.xml b/man/sd_notify.xml index e0c32d455..366ed5da6 100644 --- a/man/sd_notify.xml +++ b/man/sd_notify.xml @@ -232,25 +232,26 @@ to send messages with FDSTORE=1, see below. + + FDSTOREREMOVE=1 + + Removes file descriptors from the file descriptor store. This field needs to be combined with + FDNAME= to specify the name of the file descriptors to remove. + + FDNAME=… - When used in combination with - FDSTORE=1, specifies a name for the - submitted file descriptors. This name is passed to the service - during activation, and may be queried using + When used in combination with FDSTORE=1, specifies a name for the submitted + file descriptors. When used with FDSTOREREMOVE=1, specifies the name for the file + descriptors to remove. This name is passed to the service during activation, and may be queried using sd_listen_fds_with_names3. File - descriptors submitted without this field set, will implicitly - get the name stored assigned. Note that, if - multiple file descriptors are submitted at once, the specified - name will be assigned to all of them. In order to assign - different names to submitted file descriptors, submit them in - separate invocations of - sd_pid_notify_with_fds(). The name may - consist of any ASCII character, but must not contain control - characters or :. It may not be longer than - 255 characters. If a submitted name does not follow these - restrictions, it is ignored. + descriptors submitted without this field set, will implicitly get the name stored + assigned. Note that, if multiple file descriptors are submitted at once, the specified name will be assigned to + all of them. In order to assign different names to submitted file descriptors, submit them in separate + invocations of sd_pid_notify_with_fds(). The name may consist of arbitrary ASCII + characters except control characters or :. It may not be longer than 255 characters. If a + submitted name does not follow these restrictions, it is ignored.