Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

system-hardware-interfaces: Commit

system/hardware/interfaces


Commit MetaInfo

Revisionc4c90ecd9ad6319d3181527d2fdc3a2f98607834 (tree)
Time2020-07-15 06:14:54
AuthorKalesh Singh <kaleshsingh@goog...>
CommiterAutomerger Merge Worker

Log Message

Ignore SIGPIPE when dumping stats from SystemSuspend am: ce3c6a66c4

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/hardware/interfaces/+/12150185

Change-Id: Ia18f6a1b64bada13b9d1b092557f644b78ff0616

Change Summary

Incremental Difference

--- a/suspend/1.0/default/SuspendControlService.cpp
+++ b/suspend/1.0/default/SuspendControlService.cpp
@@ -18,6 +18,7 @@
1818
1919 #include <android-base/logging.h>
2020 #include <android-base/stringprintf.h>
21+#include <signal.h>
2122
2223 #include "SystemSuspend.h"
2324
@@ -29,6 +30,10 @@ namespace system {
2930 namespace suspend {
3031 namespace V1_0 {
3132
33+static void register_sig_handler() {
34+ signal(SIGPIPE, SIG_IGN);
35+}
36+
3237 template <typename T>
3338 binder::Status retOk(const T& value, T* ret_val) {
3439 *ret_val = value;
@@ -113,6 +118,8 @@ static std::string dumpUsage() {
113118 }
114119
115120 status_t SuspendControlService::dump(int fd, const Vector<String16>& args) {
121+ register_sig_handler();
122+
116123 const auto suspendService = mSuspend.promote();
117124 if (!suspendService) {
118125 return DEAD_OBJECT;
Show on old repository browser