summaryrefslogtreecommitdiffstats
path: root/init/service.cpp
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2018-02-13 16:24:51 -0800
committerTom Cherry <tomcherry@google.com>2018-02-14 16:37:17 -0800
commit9cbf57048cf0057f499bf1911e4ac3eba795becb (patch)
treed35ece56762c71f178792237b1441f0592042233 /init/service.cpp
parent7fd3bc27eccdcb11de4886bdda05cd26a8d8af5c (diff)
downloadsystem_core-9cbf57048cf0057f499bf1911e4ac3eba795becb.tar.gz
system_core-9cbf57048cf0057f499bf1911e4ac3eba795becb.tar.bz2
system_core-9cbf57048cf0057f499bf1911e4ac3eba795becb.zip
Move all Action parsing into ActionParser
Bug: 36970783 Test: Build Change-Id: Iea2d97fb45c3e88bc83fb72d6fa67049be42cfa9
Diffstat (limited to 'init/service.cpp')
-rw-r--r--init/service.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/init/service.cpp b/init/service.cpp
index a4e33f7ec..7454a34ca 100644
--- a/init/service.cpp
+++ b/init/service.cpp
@@ -189,7 +189,8 @@ Service::Service(const std::string& name, unsigned flags, uid_t uid, gid_t gid,
capabilities_(capabilities),
namespace_flags_(namespace_flags),
seclabel_(seclabel),
- onrestart_(false, subcontext_for_restart_commands, "<Service '" + name + "' onrestart>", 0),
+ onrestart_(false, subcontext_for_restart_commands, "<Service '" + name + "' onrestart>", 0,
+ "onrestart", {}),
keychord_id_(0),
ioprio_class_(IoSchedClass_NONE),
ioprio_pri_(0),
@@ -199,9 +200,7 @@ Service::Service(const std::string& name, unsigned flags, uid_t uid, gid_t gid,
soft_limit_in_bytes_(-1),
limit_in_bytes_(-1),
start_order_(0),
- args_(args) {
- onrestart_.InitSingleTrigger("onrestart");
-}
+ args_(args) {}
void Service::NotifyStateChange(const std::string& new_state) const {
if ((flags_ & SVC_TEMPORARY) != 0) {