]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/main.c
pid1: make sure to restore correct default values for some rlimits
authorFranck Bui <fbui@suse.com>
Wed, 10 Jul 2019 15:00:46 +0000 (17:00 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 16 Jul 2019 21:24:27 +0000 (06:24 +0900)
commita9fd4cd1206832a61aaf61fff583bb133e6cb965
tree4959f1c1159986f76e8fd1bc498002ded8e5bde9
parentca22d04ceea1198d00b170f2c13725a4f6d600ad
pid1: make sure to restore correct default values for some rlimits

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.
src/core/main.c