sequence: immediately stop child on exit

The sequence app should immediately stop the child when it called
parent().exit(). Otherwise, the child will continue execution which
causes a race condition: The child's ld.lib.so will eventually destruct
an Attached_rom_dataspace for the config rom. If sequence destructed the
corresponding service first, we will get an Ipc_error.

genodelabs/genode#4267
This commit is contained in:
Johannes Schlatow 2021-09-28 13:24:32 +02:00 committed by Norman Feske
parent e6bd9fd7da
commit 93583cce3b

View File

@ -150,6 +150,7 @@ struct Sequence::Child : Genode::Child_policy
void exit(int exit_value) override void exit(int exit_value) override
{ {
_exit_value = exit_value; _exit_value = exit_value;
_child.close_all_sessions();
_exit_transmitter.submit(); _exit_transmitter.submit();
} }