diff options
Diffstat (limited to 'init/builtins.cpp')
-rw-r--r-- | init/builtins.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/init/builtins.cpp b/init/builtins.cpp index 965a81fbe..2388edcf7 100644 --- a/init/builtins.cpp +++ b/init/builtins.cpp @@ -265,10 +265,14 @@ static int do_exec(const std::vector<std::string>& args) { if (!svc) { return -1; } + if (!start_waiting_for_exec()) { + return -1; + } if (!svc->Start()) { + stop_waiting_for_exec(); + ServiceManager::GetInstance().RemoveService(*svc); return -1; } - waiting_for_exec = true; return 0; } @@ -1018,7 +1022,7 @@ static int do_wait_for_prop(const std::vector<std::string>& args) { << "\") failed: value too long"; return -1; } - if (!wait_property(name, value)) { + if (!start_waiting_for_property(name, value)) { LOG(ERROR) << "do_wait_for_prop(\"" << name << "\", \"" << value << "\") failed: init already in waiting"; return -1; |