Handling potential SIGPIPE signals.

There are cases where dumping Java traces times out and then later tries
to write to a closed pipe, causing incidentd to crash. This introduces a
handler for the SIGPIPE signal so it doesn't crash due to a closed pipe.

Bug: 111729299
Test: lower section timeout to 5 seconds and make sure incident service
doesn't crash

Change-Id: I868aba1ae21a50ae76977e0e09e782cf94198473
(cherry picked from commit 5b763c13472effa7df25cc53a44d5bdae9392410)
1 file changed