diff --git a/repos/os/run/init.run b/repos/os/run/init.run index 87cc1fd6a47..a7afcb35a43 100644 --- a/repos/os/run/init.run +++ b/repos/os/run/init.run @@ -91,6 +91,78 @@ append config { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1336,11 +1408,11 @@ append config { - + - + @@ -1371,7 +1443,7 @@ append config { - + diff --git a/repos/os/src/app/dummy/main.cc b/repos/os/src/app/dummy/main.cc index 9df645753ec..a1d88fd318d 100644 --- a/repos/os/src/app/dummy/main.cc +++ b/repos/os/src/app/dummy/main.cc @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -333,6 +334,11 @@ struct Dummy::Main if (node.type() == "log") log(node.attribute_value("string", String<50>())); + + if (node.type() == "exit") { + _env.parent().exit(0); + sleep_forever(); + } }); } diff --git a/repos/os/src/init/child.cc b/repos/os/src/init/child.cc index 68417becbba..67b386a7abe 100644 --- a/repos/os/src/init/child.cc +++ b/repos/os/src/init/child.cc @@ -26,7 +26,7 @@ void Init::Child::destroy_services() Init::Child::Apply_config_result Init::Child::apply_config(Xml_node start_node) { - if (_state == STATE_ABANDONED) + if (_state == STATE_ABANDONED || _exited) return NO_SIDE_EFFECTS; /*