From c661b660fe1eaa82e13ca898390517a94df256c8 Mon Sep 17 00:00:00 2001 From: Zimuzo Date: Mon, 14 Jan 2019 16:16:07 +0000 Subject: [PATCH] Identify post-apexd crashing processes I7d47ea1223f7792a834981c729694242ab3f28c9 tried to identify processes that crash after apexd is ready by introducing an 'updatable' class. However, after I7ca67755dc0656c0f0c834ba94bf23ba9b1aca68 we now have a pre_apexd_ field we can reuse instead of introducing a new class type. Bug: 120598832 Test: Killing a !pre_apexd_ process 4 times in 4mins sets the ro.init.updatable.crashing prop while killing a pre_apexd_ process reboots into the bootloader Change-Id: Icb9f405b9b54d11546bbf6d3bc28212936a78b0e --- init/service.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/service.cpp b/init/service.cpp index eec55c3c0..f3eafe410 100644 --- a/init/service.cpp +++ b/init/service.cpp @@ -406,7 +406,7 @@ void Service::Reap(const siginfo_t& siginfo) { // If we crash > 4 times in 4 minutes, reboot into bootloader or set crashing property boot_clock::time_point now = boot_clock::now(); - if (((flags_ & SVC_CRITICAL) || classnames_.count("updatable")) && !(flags_ & SVC_RESTART)) { + if (((flags_ & SVC_CRITICAL) || !pre_apexd_) && !(flags_ & SVC_RESTART)) { if (now < time_crashed_ + 4min) { if (++crash_count_ > 4) { if (flags_ & SVC_CRITICAL) {