From 7e47915755ad997a5a2a049935207f2b548a2a84 Mon Sep 17 00:00:00 2001 From: Tom Cherry Date: Tue, 17 Mar 2020 09:31:01 -0700 Subject: [PATCH] storaged: ignore SIGPIPE It is possible for storaged to terminate due to SIGPIPE if its clients have terminated. This is not a fatal condition from storaged's perspective, so we ignore SIGPIPE instead. Bug: 151581751 Test: build Merged-In: I633780ed20908be02e5e1dea9504e140932afc8c Change-Id: I633780ed20908be02e5e1dea9504e140932afc8c (cherry picked from commit 3f3b1708d9539c2d057555deb132f82fb0d29176) --- storaged/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/storaged/main.cpp b/storaged/main.cpp index a7bda1492..bbed210de 100644 --- a/storaged/main.cpp +++ b/storaged/main.cpp @@ -71,6 +71,7 @@ int main(int argc, char** argv) { bool flag_dump_perf = false; int opt; + signal(SIGPIPE, SIG_IGN); android::base::InitLogging(argv, android::base::LogdLogger(android::base::SYSTEM)); for (;;) {