diff options
| author | android-build-team Robot <android-build-team-robot@google.com> | 2020-07-15 01:05:32 +0000 |
|---|---|---|
| committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-07-15 01:05:32 +0000 |
| commit | ade909a0af299e9bbbd13e14d44777e9de41bc19 (patch) | |
| tree | 50b99c4ffca0c40245fbd42f45dec7391a1a7eba | |
| parent | 43c82d42e423b314c6edc4cd05a5a10489dbe751 (diff) | |
| parent | ce3c6a66c4eb98428d3afa471de550b4181fb4e9 (diff) | |
| download | platform_system_hardware_interfaces-android11-s1-release.tar.gz platform_system_hardware_interfaces-android11-s1-release.tar.bz2 platform_system_hardware_interfaces-android11-s1-release.zip | |
Snap for 6680390 from ce3c6a66c4eb98428d3afa471de550b4181fb4e9 to rvc-releaseandroid-vts-11.0_r1android-security-11.0.0_r1android-platform-11.0.0_r2android-platform-11.0.0_r1android-cts-11.0_r1android-11.0.0_r5android-11.0.0_r4android-11.0.0_r3android-11.0.0_r25android-11.0.0_r2android-11.0.0_r17android-11.0.0_r1android11-security-releaseandroid11-s1-releaseandroid11-release
Change-Id: I78c1362ae163770fa011d9e721c32383ca808866
| -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 2a4748b7..671f3dd8 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; |
