Merge "init: log services requested restart" am: 0ddcf6d2f1

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2099238

Change-Id: I2787b58b63670b60bcaa899bb68a2a64341ae06c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2022-05-18 05:53:40 +00:00 committed by Automerger Merge Worker
commit 4d3bf512b0

View file

@ -545,6 +545,10 @@ Result<void> Service::Start() {
if ((flags_ & SVC_ONESHOT) && disabled) {
flags_ |= SVC_RESTART;
}
LOG(INFO) << "service '" << name_
<< "' requested start, but it is already running (flags: " << flags_ << ")";
// It is not an error to try to start a service that is already running.
reboot_on_failure.Disable();
return {};