]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man: Add remarks about StandardInput=socket and sd_listen_fds() 29770/head
authorMichal Koutný <mkoutny@suse.com>
Mon, 30 Oct 2023 18:50:20 +0000 (19:50 +0100)
committerMichal Koutný <mkoutny@suse.com>
Tue, 31 Oct 2023 12:08:45 +0000 (13:08 +0100)
It confuses users when they cannot find respective environment variables
with config that is supposes for (x)inetd activated service only.

Fix: #29670

man/sd_listen_fds.xml
man/systemd.exec.xml

index 9fc06d730b3864846d96403b3ec1f6b8ffbb70c8..7cd744e6c111d230f997b2d5b8a437f2bf53e2f5 100644 (file)
     number. <function>sd_listen_fds_with_names()</function> does the
     same but also parses <varname>$LISTEN_FDNAMES</varname> if
     set.</para>
+
+    <para>These functions are not designed for services that specify <varname>StandardInput=socket</varname>
+    as the <varname>$LISTEN_FDS</varname> variable is not set in their environment.</para>
   </refsect1>
 
   <refsect1>
index a82868aeb123da1df8719b037afe5438c538b743..e9cef24d1821d06b090e3583ed057b378bbce586 100644 (file)
@@ -2941,7 +2941,8 @@ SystemCallErrorNumber=EPERM</programlisting>
         input will be connected to the socket the service was activated from, which is primarily useful for
         compatibility with daemons designed for use with the traditional <citerefentry
         project='freebsd'><refentrytitle>inetd</refentrytitle><manvolnum>8</manvolnum></citerefentry> socket activation
-        daemon.</para>
+        daemon (<varname>$LISTEN_FDS</varname> (and related) environment variables are not passed when
+        <option>socket</option> value is configured).</para>
 
         <para>The <option>fd:<replaceable>name</replaceable></option> option connects standard input to a specific,
         named file descriptor provided by a socket unit. The name may be specified as part of this option, following a