]> git.ipfire.org Git - thirdparty/systemd.git/commit
main: when generating the resource limit to pass to children, take FD_SETSIZE into...
authorLennart Poettering <lennart@poettering.net>
Wed, 16 Jan 2019 17:06:18 +0000 (18:06 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 18 Jan 2019 16:31:36 +0000 (17:31 +0100)
commit99a2fd3bcaa123d38a2d757cb3693e31e138e56b
tree81b3c653c7ef582695092c6c2200dc129642a32a
parentcda7faa9a5ae2fa1ebc27b08e84d5ce62e46e37b
main: when generating the resource limit to pass to children, take FD_SETSIZE into consideration

When we synthesize a "struct rlimit" structure to pass on for
RLIMIT_NOFILE to our children, let's explicitly make sure that the soft
limit is not above FD_SETSIZE, for compat reason with select().

Note this only applies when we derive the "struct rlimit" from what we
inherited. If the user configures something explicitly it always takes
precedence.
src/core/main.c