From 556fec24b10a63f7f23c9dcec955724cb56c44d3 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 18 Aug 2017 12:50:33 +0200 Subject: [PATCH] core-linux: avoid block-for-signal assertion This patch removes the assertion about the unexpected call of 'block_for_signal' within core. On Linux, this call is actually expected because of the handling of SIGCHLD signals by core. --- repos/base/src/core/signal_receiver.cc | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/repos/base/src/core/signal_receiver.cc b/repos/base/src/core/signal_receiver.cc index 94de4769b..f84b733a8 100644 --- a/repos/base/src/core/signal_receiver.cc +++ b/repos/base/src/core/signal_receiver.cc @@ -16,6 +16,7 @@ /* Genode includes */ #include +#include /* base-internal includes */ #include @@ -35,6 +36,17 @@ void Signal_receiver::unblock_signal_waiter(Rpc_entrypoint &) { ASSERT_NEVER_CAL typedef Signal_context_capability Sigh_cap; -Sigh_cap Signal_receiver::manage(Signal_context *) { ASSERT_NEVER_CALLED; } -void Signal_receiver::block_for_signal() { ASSERT_NEVER_CALLED; } -void Signal_receiver::local_submit(Signal::Data) { ASSERT_NEVER_CALLED; } +Sigh_cap Signal_receiver::manage(Signal_context *) { ASSERT_NEVER_CALLED; } + +void Signal_receiver::block_for_signal() +{ + /* + * Called by 'entrypoint.cc' after leaving the 'Rpc_construct' RPC call. + * This happens in particular when the blocking for the reply for the + * 'Rpc_construct' call is canceled by an incoming SIGCHLD signal, which + * occurs whenever a child component exits. + */ + sleep_forever(); +} + +void Signal_receiver::local_submit(Signal::Data) { ASSERT_NEVER_CALLED; }