summaryrefslogtreecommitdiffstats
path: root/init/init.cpp
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2017-09-26 08:26:12 -0700
committerMark Salyzyn <salyzyn@google.com>2017-09-27 09:10:00 -0700
commit161b8626bdae56350486feeb455865adf32b952a (patch)
treecfa56570f5cfd838594360948da8d7415382e730 /init/init.cpp
parent82ee4060ed01934fe3de94e5219f79aed4d86c9e (diff)
downloadsystem_core-161b8626bdae56350486feeb455865adf32b952a.tar.gz
system_core-161b8626bdae56350486feeb455865adf32b952a.tar.bz2
system_core-161b8626bdae56350486feeb455865adf32b952a.zip
init: report shutdown,container for sigterm of init
Change HandleSigtermSignal() handler to report shutdown,container. Add the new reason to bootstat. Remove log stutter as HandlPowerctlMessage will also do a LOG(INFO) reporting shutdown,container as reason. Sending SIGTERM to init is to allow a host OS to ask an Android Container instance to shutdown. The temptation is to report shutdown,sigterm but that does not accurately describe the usage scenario. Test: compile Bug: 63736262 Change-Id: I3c5798921bdbef5d2689ad22a2e8103741b570b4
Diffstat (limited to 'init/init.cpp')
-rw-r--r--init/init.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/init/init.cpp b/init/init.cpp
index 817b33e75..dbe833f1a 100644
--- a/init/init.cpp
+++ b/init/init.cpp
@@ -417,8 +417,7 @@ static void HandleSigtermSignal() {
return;
}
- LOG(INFO) << "Handling SIGTERM, shutting system down";
- HandlePowerctlMessage("shutdown");
+ HandlePowerctlMessage("shutdown,container");
}
static void InstallSigtermHandler() {