Robustification of logging to a socket.  If the listener process dies
or for whatever reason hangs up the connection, don't let valgrind
get SIGPIPE; instead just switch back to spewing messages on stderr.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1273 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_main.c b/coregrind/vg_main.c
index 30fcac7..85eebc1 100644
--- a/coregrind/vg_main.c
+++ b/coregrind/vg_main.c
@@ -1102,14 +1102,18 @@
 	 }
          if (eventually_logfile_fd == -2) {
             VG_(message)(Vg_UserMsg, 
-               "Failed to connect to logging server `%s'; giving up",
+               "valgrind: failed to connect to logging server `%s'.",
                VG_(clo_logfile_name) ); 
-            VG_(bad_option)(
-               "--logsocket= (timeout during connect)");
-	 }
-	 vg_assert(eventually_logfile_fd > 0);
-         VG_(clo_logfile_fd) = eventually_logfile_fd;
-         VG_(logging_to_filedes) = False;
+            VG_(message)(Vg_UserMsg, 
+                "Log messages will sent to stderr instead." );
+            VG_(message)(Vg_UserMsg, 
+                "" );
+            /* We don't change anything here. */
+	 } else {
+            vg_assert(eventually_logfile_fd > 0);
+            VG_(clo_logfile_fd) = eventually_logfile_fd;
+            VG_(logging_to_filedes) = False;
+         }
          break;
       }