From ed15a46ca435ed6259399c519c0f4662c9c53738 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Wed, 15 Jul 2020 16:10:22 +0200 Subject: [PATCH] base: construct child process only once Fixes #3821 --- repos/base/src/lib/base/child.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/repos/base/src/lib/base/child.cc b/repos/base/src/lib/base/child.cc index 188319bbfd..898e890d80 100644 --- a/repos/base/src/lib/base/child.cc +++ b/repos/base/src/lib/base/child.cc @@ -778,6 +778,9 @@ void Child::_try_construct_env_dependent_members() if (session.phase == Session_state::AVAILABLE) session.phase = Session_state::CAP_HANDED_OUT; }); + if (_process.constructed()) + return; + _policy.init(_cpu.session(), _cpu.cap()); Process::Type const type = _policy.forked()