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 <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2017-12-29 16:51:49 +01:00
1 parent c1344e89ff
commit 338810b886
1 file changed
+6 -5
+6 -5
View File
@@ -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
*/