From 761791bcf83219f44fc799a2e4326121486817b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Koutn=C3=BD?= Date: Mon, 30 Oct 2023 18:33:51 +0100 Subject: [PATCH 1/2] sysctl.d: Fix pid_max comment The actual default is 2^15 and that is also 32b kernels default. Fix the value, mention 32b and do not talk about default which may depend on nr_cpus. Fix: #29607 --- sysctl.d/50-pid-max.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysctl.d/50-pid-max.conf b/sysctl.d/50-pid-max.conf index 1eff2d7ecee..2beaf48f21f 100644 --- a/sysctl.d/50-pid-max.conf +++ b/sysctl.d/50-pid-max.conf @@ -11,6 +11,6 @@ # (e.g. /etc/sysctl.d/90-override.conf), and put any assignments # there. -# Bump the numeric PID range to its maximum of 2^22 (from the in-kernel default -# of 2^16), to make PID collisions less likely. +# Bump the numeric PID range to make PID collisions less likely. +# 2^22 and 2^15 is possible maximum of 64bit and 32bit kernels respectively. kernel.pid_max = 4194304 From 788b7e7630669a47c54c6f3299af14db26ca7fe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Koutn=C3=BD?= Date: Mon, 30 Oct 2023 19:50:20 +0100 Subject: [PATCH 2/2] man: Add remarks about StandardInput=socket and sd_listen_fds() 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 | 3 +++ man/systemd.exec.xml | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/man/sd_listen_fds.xml b/man/sd_listen_fds.xml index 9fc06d730b3..7cd744e6c11 100644 --- a/man/sd_listen_fds.xml +++ b/man/sd_listen_fds.xml @@ -198,6 +198,9 @@ number. sd_listen_fds_with_names() does the same but also parses $LISTEN_FDNAMES if set. + + These functions are not designed for services that specify StandardInput=socket + as the $LISTEN_FDS variable is not set in their environment. diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml index a82868aeb12..e9cef24d182 100644 --- a/man/systemd.exec.xml +++ b/man/systemd.exec.xml @@ -2941,7 +2941,8 @@ SystemCallErrorNumber=EPERM 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 inetd8 socket activation - daemon. + daemon ($LISTEN_FDS (and related) environment variables are not passed when + value is configured). The 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