init: keep running even when RAM is exhausted

When exhausted of RAM quota while starting children, init used to throw
an uncaught 'Out_of_ram' exception as this condition was considered
fatal. However, this behavior is undesired when init is used in a highly
dynamic yet long-running fashion like sculpt's runtime subsystem. This
change keeps init running despite the error condition, giving the user
the chance to relieve the resource pressure.
This commit is contained in:
Norman Feske 2018-05-16 20:54:27 +02:00 committed by Christian Helmuth
parent 967abd4e91
commit 0c26f33819

View File

@ -349,12 +349,12 @@ void Init::Main::_handle_config()
if (used_ram.value > avail_ram.value) {
error("RAM exhausted while starting childen");
throw Out_of_ram();
return;
}
if (used_caps.value > avail_caps.value) {
error("capabilities exhausted while starting childen");
throw Out_of_caps();
return;
}
try {