Fix SIGPIPE handling in the socket_vsock_proxy tool

Was able to catch that with some of fastboot clients
(for example default fastboot in the acloud instances)
fastboot connection is unexpectively closed and
the whole proxy process is turned down because of that.

According to strace this problem is causeŠ² by SIGPIPE signal
default behaviour, which according to jemoreira comment on
Proxy must be disabled and handled as a regular write error.

So doing it to fix this particular problem and improve the
stability of adb / fastboot.

Test: checked fastboot proxy is not crashing with the different fastboot clients
Test: checked adb works with --adb_mode=vsock_tunnel
Bug: 265289715

Change-Id: Ic781bf26526393c24e52b72c5cafbe8a2f23e64f
Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
diff --git a/common/frontend/socket_vsock_proxy/main.cpp b/common/frontend/socket_vsock_proxy/main.cpp
index 3c876ed..67a17bd 100644
--- a/common/frontend/socket_vsock_proxy/main.cpp
+++ b/common/frontend/socket_vsock_proxy/main.cpp
@@ -15,6 +15,7 @@
  */
 
 #include <sstream>
+#include <signal.h>
 #include <android-base/logging.h>
 #include <gflags/gflags.h>
 
@@ -147,6 +148,8 @@
 }
 
 int main(int argc, char* argv[]) {
+  signal(SIGPIPE, SIG_IGN);
+
 #ifdef CUTTLEFISH_HOST
   cuttlefish::DefaultSubprocessLogging(argv);
 #else