diff options
author | Christian Brauner <christian.brauner@ubuntu.com> | 2017-04-26 06:18:10 +0200 |
---|---|---|
committer | Evgeny Vereshchagin <evvers@ya.ru> | 2017-04-26 07:18:10 +0300 |
commit | 6385cb31ef443be3e0d6da5ea62a267a49174688 (patch) | |
tree | 9507904f4b870e4ae2d355f616ca4a2ceb640892 /units/sound.target | |
parent | 1f0f4f3bfd05fd416e3e2dea10ad225b276a6ef7 (diff) |
main: improve RLIMIT_NOFILE handling (#5795)
This has systemd look at /proc/sys/fs/nr_open to find the current maximum of
open files compiled into the kernel and tries to set the RLIMIT_NOFILE max to
it. This has the advantage the value chosen as limit is less arbitrary and also
improves the behavior of systemd in containers that have an rlimit set: When
systemd currently starts in a container that has RLIMIT_NOFILE set to e.g.
100000 systemd will lower it to 65536. With this patch systemd will try to set
the nofile limit to the allowed kernel maximum. If this fails, it will compute
the minimum of the current set value (the limit that is set on the container)
and the maximum value as soft limit and the currently set maximum value as the
maximum value. This way it retains the limit set on the container.
Diffstat (limited to 'units/sound.target')
0 files changed, 0 insertions, 0 deletions