From 26b2be0d3036df04853f908ffd3d776db2b98ac2 Mon Sep 17 00:00:00 2001 From: Jin Qian Date: Mon, 3 Apr 2017 18:10:38 -0700 Subject: [PATCH] storaged: stop binder threads before exiting Test: kill healthd when storaged is running Bug: 36652060 Change-Id: Ie55fb6cb7c8c6df6ce6bc4820c476b90cc0f4165 --- storaged/storaged.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/storaged/storaged.cpp b/storaged/storaged.cpp index aa3d1de73..54d429cd8 100644 --- a/storaged/storaged.cpp +++ b/storaged/storaged.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -192,6 +193,7 @@ void storaged_t::binderDied(const wp& who) { if (battery_properties != NULL && IInterface::asBinder(battery_properties) == who) { LOG_TO(SYSTEM, ERROR) << "batteryproperties service died, exiting"; + IPCThreadState::self()->stopProcess(); exit(1); } else { LOG_TO(SYSTEM, ERROR) << "unknown service died";