Ignore SIGPIPE when dumping stats from SystemSuspend

SuspendControlService dumps wakelock and suspend stats via dumpsys.
If dumpsys closes the reading end of the pipe (likely due to timeout)
and SuspendControlService attempts to write to the fd it received form
dumpsys, the processreceives sig 13 (SIGPIPE), and is then killed.
System suspend is a critical process and should not be killed for a
failure to dump stats.
If System suspend dies binder sends a failed response for any ongoing
wakelock binder trasactions.
This leads to the unchecked failed HIDL return, which causes an ABORT.

Bug: 160741383
Test: SystemSuspendV1_0UnitTest

Change-Id: I4f2ff7fc14b6fbeda2098f798f7c526580b17ce9
(cherry picked from commit 303520bd3f4f16c3dcc180851622f8cb3b84d2e0)
1 file changed