From 0c26f33819ba84706a312acd6d21670bbcc3825a Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 16 May 2018 20:54:27 +0200 Subject: [PATCH] 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. --- repos/os/src/init/main.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/os/src/init/main.cc b/repos/os/src/init/main.cc index 23aea6e1c5..c2ac2f6a91 100644 --- a/repos/os/src/init/main.cc +++ b/repos/os/src/init/main.cc @@ -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 {