Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ffd88f2 authored by Jooyung Han's avatar Jooyung Han
Browse files

init: move `MarkServicesUpdate` later

MarkServicesUpdate() starts delayed services which are mostly for
APEXes. (e.g. start a service from APEX). But before
"DefaultNamespaceReady", services are started in "bootstrap" mount
namespace, which makes services from non-bootstrap APEXes fail to start.

This is a quick fix for the problem before coming up with better
solution in the future.

Bug: 293535323
Test: add 'start adbd' before 'perform_apex_config' in init.rc
      adbd starts successfully.
Change-Id: I846689f7c38cdca83c1f7faec0106b8174527e09
parent 545f3e0d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1297,7 +1297,6 @@ static Result<void> do_perform_apex_config(const BuiltinArguments& args) {
        return create_dirs.error();
    }
    auto parse_configs = ParseApexConfigs(/*apex_name=*/"");
    ServiceList::GetInstance().MarkServicesUpdate();
    if (!parse_configs.ok()) {
        return parse_configs.error();
    }
@@ -1307,6 +1306,8 @@ static Result<void> do_perform_apex_config(const BuiltinArguments& args) {
        return update_linker_config.error();
    }

    // Now start delayed services
    ServiceList::GetInstance().MarkServicesUpdate();
    return {};
}