diff --git a/repos/base/src/lib/base/child.cc b/repos/base/src/lib/base/child.cc index dcbdf2728f..05980423c5 100644 --- a/repos/base/src/lib/base/child.cc +++ b/repos/base/src/lib/base/child.cc @@ -889,7 +889,6 @@ void Child::close_all_sessions() _binary.close(); if (_linker.constructed()) _linker->close(); - _pd.close(); /* * Remove statically created env sessions from the child's ID space. @@ -915,6 +914,8 @@ void Child::close_all_sessions() while (_id_space.apply_any(close_fn)); + _pd.close(); + if (!KERNEL_SUPPORTS_EAGER_CHILD_DESTRUCTION) _cpu._connection.destruct(); }