ShellSubscriber: install SIGPIPE handler

Install a handler that ignores SIGPIPE. Before this, SIGPIPE was not
being handled, which caused a SIGKILL to be sent to statsd. Note that
even if SIGPIPE is handled, writes to closed pipes will return EPIPE.

Bug: 153595161
Test: procedure specified in b/153595161
    1. cat statsd config | adb shell cmd stats data-subscribe
    2. Terminate the shell command
    3. cat statsd config | adb shell cmd stats data-subscribe
Change-Id: Ib5e679ccd7cdf7182452466b316488439871db99
1 file changed