base: catch 'Ipc_error' in 'Expanding_parent_client::exit()'

If a component is being destroyed just before it calls `exit()` at its
parent, the `exit()` call causes an `Ipc_error` exception, which leads to
an `abort()` loop with repeated error messages, because `abort()` calls
`exit()` too. Catching the exception in `Expanding_parent_client::exit()`
avoids this problem.

Fixes #3228
This commit is contained in:
Christian Prochaska 2019-03-13 17:49:34 +01:00 committed by Christian Helmuth
parent 98e2f91036
commit 67fd77d10a

View File

@ -93,6 +93,20 @@ class Genode::Expanding_parent_client : public Parent_client
** Parent interface **
**********************/
void exit(int exit_value) override
{
try {
Parent_client::exit(exit_value);
} catch (Genode::Ipc_error) {
/*
* This can happen if the child is being destroyed before
* calling 'exit()'. Catching the exception avoids an
* 'abort()' loop with repeated error messages, because
* 'abort()' calls 'exit()' too.
*/
}
}
Session_capability session(Client::Id id,
Service_name const &name,
Session_args const &args,