Home
last modified time | relevance | path

Searched refs:subcontext (Results 1 – 8 of 8) sorted by relevance

/system/core/init/
Dsubcontext_test.cpp56 auto subcontext = Subcontext("dummy_path", context_string); in RunTest() local
57 ASSERT_NE(0, subcontext.pid()); in RunTest()
59 test_function(subcontext, context_string); in RunTest()
61 if (subcontext.pid() > 0) { in RunTest()
62 kill(subcontext.pid(), SIGTERM); in RunTest()
63 kill(subcontext.pid(), SIGKILL); in RunTest()
67 TEST(subcontext, CheckDifferentPid) { in TEST() argument
68 RunTest([](auto& subcontext, auto& context_string) { in TEST() argument
69 auto result = subcontext.Execute(std::vector<std::string>{"return_pids_as_error"}); in TEST()
80 TEST(subcontext, SetProp) { in TEST() argument
[all …]
Daction_parser.cpp36 bool IsActionableProperty(Subcontext* subcontext, const std::string& prop_name) { in IsActionableProperty() argument
39 if (subcontext == nullptr || !enabled) { in IsActionableProperty()
55 return CanReadProperty(subcontext->context(), prop_name); in IsActionableProperty()
58 Result<Success> ParsePropertyTrigger(const std::string& trigger, Subcontext* subcontext, in ParsePropertyTrigger() argument
70 if (!IsActionableProperty(subcontext, prop_name)) { in ParsePropertyTrigger()
80 Result<Success> ParseTriggers(const std::vector<std::string>& args, Subcontext* subcontext, in ParseTriggers() argument
98 if (auto result = ParsePropertyTrigger(args[i], subcontext, property_triggers); in ParseTriggers()
125 for (auto& subcontext : *subcontexts_) { in ParseSection()
126 if (StartsWith(filename, subcontext.path_prefix())) { in ParseSection()
127 action_subcontext = &subcontext; in ParseSection()
Dsubcontext_benchmark.cpp38 auto subcontext = Subcontext("path", context); in BenchmarkSuccess() local
42 subcontext.Execute(std::vector<std::string>{"return_success"}).IgnoreError(); in BenchmarkSuccess()
45 if (subcontext.pid() > 0) { in BenchmarkSuccess()
46 kill(subcontext.pid(), SIGTERM); in BenchmarkSuccess()
47 kill(subcontext.pid(), SIGKILL); in BenchmarkSuccess()
Daction.cpp54 Result<Success> Command::InvokeFunc(Subcontext* subcontext) const { in InvokeFunc()
55 if (subcontext) { in InvokeFunc()
57 return subcontext->Execute(args_); in InvokeFunc()
60 auto expanded_args = subcontext->ExpandArgs(args_); in InvokeFunc()
64 return RunBuiltinFunction(func_, *expanded_args, subcontext->context()); in InvokeFunc()
74 Action::Action(bool oneshot, Subcontext* subcontext, const std::string& filename, int line, in Action() argument
80 subcontext_(subcontext), in Action()
Daction.h42 Result<Success> InvokeFunc(Subcontext* subcontext) const;
60 Action(bool oneshot, Subcontext* subcontext, const std::string& filename, int line,
Dsubcontext.cpp376 for (auto& subcontext : subcontexts) { in SubcontextChildReap() local
377 if (subcontext.pid() == pid) { in SubcontextChildReap()
379 subcontext.Restart(); in SubcontextChildReap()
389 for (auto& subcontext : subcontexts) { in SubcontextTerminate() local
390 kill(subcontext.pid(), SIGTERM); in SubcontextTerminate()
DAndroid.bp130 "subcontext.cpp",
131 "subcontext.proto",
262 "subcontext.cpp",
263 "subcontext.proto",
Dservice.cpp1416 for (auto& subcontext : *subcontexts_) { in ParseSection()
1417 if (StartsWith(filename, subcontext.path_prefix())) { in ParseSection()
1418 restart_action_subcontext = &subcontext; in ParseSection()