diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2020-07-16 18:50:08 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-07-16 18:50:08 +0000 |
commit | 3be0e1d7ca4b87a8d3f91db19f7b3946ef7ec013 (patch) | |
tree | 50b99c4ffca0c40245fbd42f45dec7391a1a7eba | |
parent | 33bbc13c3c631466acc5ae420ff699d2193c0e5d (diff) | |
parent | ab52ff60a235c20d1c4e92001de48efce1db07fa (diff) | |
download | interfaces-android11-mainline-sparse-2021-jan-release.tar.gz |
Snap for 6685968 from ab52ff60a235c20d1c4e92001de48efce1db07fa to mainline-releaser_aml_301500702android-mainline-12.0.0_r55android-mainline-11.0.0_r9android-mainline-11.0.0_r8android-mainline-11.0.0_r7android-mainline-11.0.0_r6android-mainline-11.0.0_r5android-mainline-11.0.0_r45android-mainline-11.0.0_r4android-mainline-11.0.0_r33android-mainline-11.0.0_r3android-mainline-11.0.0_r29android-mainline-11.0.0_r2android-mainline-11.0.0_r19android-mainline-11.0.0_r10android11-mainline-sparse-2021-jan-releaseandroid11-mainline-sparse-2020-dec-releaseandroid11-mainline-release
Change-Id: I0d70c938ea8633c7f9013387b44b480032d1f7b6
-rw-r--r-- | suspend/1.0/default/SuspendControlService.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/suspend/1.0/default/SuspendControlService.cpp b/suspend/1.0/default/SuspendControlService.cpp index 2a4748b..671f3dd 100644 --- a/suspend/1.0/default/SuspendControlService.cpp +++ b/suspend/1.0/default/SuspendControlService.cpp @@ -18,6 +18,7 @@ #include <android-base/logging.h> #include <android-base/stringprintf.h> +#include <signal.h> #include "SystemSuspend.h" @@ -29,6 +30,10 @@ namespace system { namespace suspend { namespace V1_0 { +static void register_sig_handler() { + signal(SIGPIPE, SIG_IGN); +} + template <typename T> binder::Status retOk(const T& value, T* ret_val) { *ret_val = value; @@ -113,6 +118,8 @@ static std::string dumpUsage() { } status_t SuspendControlService::dump(int fd, const Vector<String16>& args) { + register_sig_handler(); + const auto suspendService = mSuspend.promote(); if (!suspendService) { return DEAD_OBJECT; |