mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-08 11:55:24 +00:00
os: handle ipc error in server framework
When using the server framework, it might happen that the main thread tries to forward a signal to the entrypoint, while the context of that signal is already destroyed. In that case the main thread will get an ipc error exception as result. Related to #113
This commit is contained in:
parent
41d5959ae5
commit
0bc012eb79
@ -128,6 +128,15 @@ int main(int argc, char **argv)
|
||||
constructor_cap.call<Server::Constructor::Rpc_construct>();
|
||||
|
||||
/* process incoming signals */
|
||||
for (;;)
|
||||
wait_and_dispatch_one_signal(false);
|
||||
for (;;) {
|
||||
|
||||
/*
|
||||
* It might happen that we try to forward a signal to the entrypoint,
|
||||
* while the context of that signal is already destroyed. In that case
|
||||
* we will get an ipc error exception as result, which has to be caught.
|
||||
*/
|
||||
try {
|
||||
wait_and_dispatch_one_signal(false);
|
||||
} catch(Genode::Ipc_error) { }
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user