summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJin Qian2017-04-03 20:10:38 -0500
committerJin Qian2017-04-04 14:44:01 -0500
commit26b2be0d3036df04853f908ffd3d776db2b98ac2 (patch)
tree6376d7bbd613ef8af0930b6d455986d67ae28540 /storaged
parent566e63da538b627f00e35c5f80b4215534c7d6cb (diff)
downloadplatform-system-core-26b2be0d3036df04853f908ffd3d776db2b98ac2.tar.gz
platform-system-core-26b2be0d3036df04853f908ffd3d776db2b98ac2.tar.xz
platform-system-core-26b2be0d3036df04853f908ffd3d776db2b98ac2.zip
storaged: stop binder threads before exiting
Test: kill healthd when storaged is running Bug: 36652060 Change-Id: Ie55fb6cb7c8c6df6ce6bc4820c476b90cc0f4165
Diffstat (limited to 'storaged')
-rw-r--r--storaged/storaged.cpp2
1 files changed, 2 insertions, 0 deletions
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 @@
23#include <android-base/logging.h> 23#include <android-base/logging.h>
24#include <batteryservice/BatteryServiceConstants.h> 24#include <batteryservice/BatteryServiceConstants.h>
25#include <batteryservice/IBatteryPropertiesRegistrar.h> 25#include <batteryservice/IBatteryPropertiesRegistrar.h>
26#include <binder/IPCThreadState.h>
26#include <binder/IServiceManager.h> 27#include <binder/IServiceManager.h>
27#include <cutils/properties.h> 28#include <cutils/properties.h>
28#include <log/log.h> 29#include <log/log.h>
@@ -192,6 +193,7 @@ void storaged_t::binderDied(const wp<IBinder>& who) {
192 if (battery_properties != NULL && 193 if (battery_properties != NULL &&
193 IInterface::asBinder(battery_properties) == who) { 194 IInterface::asBinder(battery_properties) == who) {
194 LOG_TO(SYSTEM, ERROR) << "batteryproperties service died, exiting"; 195 LOG_TO(SYSTEM, ERROR) << "batteryproperties service died, exiting";
196 IPCThreadState::self()->stopProcess();
195 exit(1); 197 exit(1);
196 } else { 198 } else {
197 LOG_TO(SYSTEM, ERROR) << "unknown service died"; 199 LOG_TO(SYSTEM, ERROR) << "unknown service died";