From 495a394fd375f673829f4c8e47e4bb05f33afcc7 Mon Sep 17 00:00:00 2001 From: Tom Cherry Date: Fri, 27 Mar 2020 14:08:20 -0700 Subject: [PATCH] init: do not handle control messages after shutdown We already stop queue'ing new control messages, but we forgot to stop handling those control messages that are already queued. This CL fixes that. Bug: 150863651 Test: CF reboots appropriately Merged-In: Ifea07a30b868de23eb735db10d8bae410e1b98bb Change-Id: Ifea07a30b868de23eb735db10d8bae410e1b98bb (cherry picked from commit 22d634884539ee7995e214a7dccbdad238049f95) --- init/init.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/init/init.cpp b/init/init.cpp index 6d984a2a2..cadd5c55d 100644 --- a/init/init.cpp +++ b/init/init.cpp @@ -879,7 +879,9 @@ int SecondStageMain(int argc, char** argv) { (*function)(); } } - HandleControlMessages(); + if (!IsShuttingDown()) { + HandleControlMessages(); + } } return 0;