From 338810b8861dbd53987e8ee9090b928305f01b7c Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Fri, 29 Dec 2017 16:51:49 +0100 Subject: [PATCH] Fix #92: Load .conf files and initialize global_rlimit[] earlier As reported in #92, systems with an udevd very early register a service using global_rlimit[]. The change was introduced in b68c5c1 but did not take the ordering problem into consideration, global_rlimit[] was left uninitialized, which likely led to severely limited udevd that was continously crashing. Signed-off-by: Joachim Nilsson --- src/finit.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/finit.c b/src/finit.c index 67709761..aac922a1 100644 --- a/src/finit.c +++ b/src/finit.c @@ -387,6 +387,12 @@ int main(int argc, char* argv[]) break; } + /* + * Initialize .conf system and load static /etc/finit.conf + * Also initializes global_rlimit[] for udevd, below. + */ + conf_init(); + /* * Some non-embedded systems without an initramfs may not have /dev mounted yet * If they do, check if system has udevadm and perform cleanup from initramfs @@ -462,11 +468,6 @@ int main(int argc, char* argv[]) } } - /* - * Initialize .conf system and load static /etc/finit.conf - */ - conf_init(); - /* * Start built-in watchdog as soon as possible, if enabled */