aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-12-15 16:48:07 +0100
committerLennart Poettering <lennart@poettering.net>2017-12-15 20:52:28 +0100
commit6f101b566f35ae2d9c9529961d64b1ca9623989e (patch)
treeabef4e1d5887c8311ddda55864e709a1e1426bf2 /src
parentmain: split out taint string logging into its own function (diff)
downloadsystemd-6f101b566f35ae2d9c9529961d64b1ca9623989e.tar.gz
systemd-6f101b566f35ae2d9c9529961d64b1ca9623989e.tar.bz2
systemd-6f101b566f35ae2d9c9529961d64b1ca9623989e.zip
main: move initialize_join_controllers() invocation into load_configuration()
This just sets up some variables the loaded configuration will then modify. Let's invoke it hence right before loading the configuration. This moves the initialization just a tiny bit later, but that shouldn't matter, since we never access it in-between.
Diffstat (limited to 'src')
-rw-r--r--src/core/main.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/main.c b/src/core/main.c
index 6734a1550..c3d0c0177 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -2056,6 +2056,12 @@ static int load_configuration(int argc, char **argv, const char **ret_error_mess
assert(ret_error_message);
+ r = initialize_join_controllers();
+ if (r < 0) {
+ *ret_error_message = "Failed to initialize cgroup controller joining table";
+ return r;
+ }
+
arg_default_tasks_max = system_tasks_max_scale(DEFAULT_TASKS_MAX_PERCENTAGE, 100U);
r = parse_config_file();
@@ -2352,12 +2358,6 @@ int main(int argc, char *argv[]) {
log_warning_errno(r, "Failed to redirect standard streams to /dev/null: %m");
}
- r = initialize_join_controllers();
- if (r < 0) {
- error_message = "Failed to initialize cgroup controllers";
- goto finish;
- }
-
/* Mount /proc, /sys and friends, so that /proc/cmdline and
* /proc/$PID/fd is available. */
if (getpid_cached() == 1) {