pid1: make sure to restore correct default values for some rlimits

System Internals / systemd - Franck Bui [suse.com] - 16 July 2019 21:24 EDT

Commit fb39af4ce42d7ef9af63009f271f404038703704 forgot to restore the default rlimit values (RLIMIT_NOFILE and RLIMIT_MEMLOCK) while PID1 is reloading.

This patch extracts the code in charge of initializing the default values for those rlimits in order to create dedicated functions, which take care of their initialization.

These functions are then called in parse_configuration() so we make sure that the default values for these rlimits get restored every time PID1 is reloading its configuration.

a9fd4cd120 pid1: make sure to restore correct default values for some rlimits
src/core/main.c | 166 ++++++++++++++++++++++++++++++++++++--------------------
1 file changed, 106 insertions(+), 60 deletions(-)

Upstream: github.com


  • Share