Home
last modified time | relevance | path

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

/system/core/init/
Dsubcontext_test.cpp44 auto subcontext = Subcontext({"dummy_path"}, kTestContext); in RunTest() local
45 ASSERT_NE(0, subcontext.pid()); in RunTest()
47 test_function(subcontext); in RunTest()
49 if (subcontext.pid() > 0) { in RunTest()
50 kill(subcontext.pid(), SIGTERM); in RunTest()
51 kill(subcontext.pid(), SIGKILL); in RunTest()
55 TEST(subcontext, CheckDifferentPid) { in TEST() argument
56 RunTest([](auto& subcontext) { in TEST() argument
57 auto result = subcontext.Execute(std::vector<std::string>{"return_pids_as_error"}); in TEST()
68 TEST(subcontext, SetProp) { in TEST() argument
[all …]
Dsubcontext_benchmark.cpp36 auto subcontext = Subcontext({"path"}, context); in BenchmarkSuccess() local
40 subcontext.Execute(std::vector<std::string>{"return_success"}); in BenchmarkSuccess()
43 if (subcontext.pid() > 0) { in BenchmarkSuccess()
44 kill(subcontext.pid(), SIGTERM); in BenchmarkSuccess()
45 kill(subcontext.pid(), SIGKILL); in BenchmarkSuccess()
Daction_parser.cpp39 bool IsActionableProperty(Subcontext* subcontext, const std::string& prop_name) { in IsActionableProperty() argument
42 if (subcontext == nullptr || !enabled) { in IsActionableProperty()
58 return CanReadProperty(subcontext->context(), prop_name); in IsActionableProperty()
61 Result<void> ParsePropertyTrigger(const std::string& trigger, Subcontext* subcontext, in ParsePropertyTrigger() argument
73 if (!IsActionableProperty(subcontext, prop_name)) { in ParsePropertyTrigger()
94 Result<void> ParseTriggers(const std::vector<std::string>& args, Subcontext* subcontext, in ParseTriggers() argument
112 if (auto result = ParsePropertyTrigger(args[i], subcontext, property_triggers); in ParseTriggers()
Daction.cpp55 Result<void> Command::InvokeFunc(Subcontext* subcontext) const { in InvokeFunc()
56 if (subcontext) { in InvokeFunc()
58 return subcontext->Execute(args_); in InvokeFunc()
61 auto expanded_args = subcontext->ExpandArgs(args_); in InvokeFunc()
65 return RunBuiltinFunction(func_, *expanded_args, subcontext->context()); in InvokeFunc()
99 Action::Action(bool oneshot, Subcontext* subcontext, const std::string& filename, int line, in Action() argument
105 subcontext_(subcontext), in Action()
Daction_parser.h33 ActionParser(ActionManager* action_manager, Subcontext* subcontext) in ActionParser() argument
34 : action_manager_(action_manager), subcontext_(subcontext), action_(nullptr) {} in ActionParser()
Dsubcontext.cpp58 static std::unique_ptr<Subcontext> subcontext; variable
334 subcontext.reset( in InitializeSubcontext()
340 return subcontext.get(); in GetSubcontext()
344 if (subcontext->pid() == pid) { in SubcontextChildReap()
346 subcontext->Restart(); in SubcontextChildReap()
355 kill(subcontext->pid(), SIGTERM); in SubcontextTerminate()
Daction.h41 Result<void> InvokeFunc(Subcontext* subcontext) const;
60 Action(bool oneshot, Subcontext* subcontext, const std::string& filename, int line,
Dservice_parser.h33 ServiceList* service_list, Subcontext* subcontext,
37 subcontext_(subcontext), in service_list_()
DAndroid.bp33 "subcontext.cpp",
34 "subcontext.proto",