Restore SIGPIPE warning when the platform doesn't have MSG_NOSIGNAL.
authorPierre Ossman <ossman@cendio.se>
Mon, 17 Jul 2006 11:26:29 +0000 (11:26 +0000)
committerPierre Ossman <ossman@cendio.se>
Mon, 17 Jul 2006 11:26:29 +0000 (11:26 +0000)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1097 fefdeb5f-60dc-0310-8127-8f9354f1896f

src/pulse/context.c
src/pulsecore/core-util.c

index 5724765..228053b 100644 (file)
@@ -132,6 +132,12 @@ pa_context *pa_context_new(pa_mainloop_api *mainloop, const char *name) {
     memset(&c->spawn_api, 0, sizeof(c->spawn_api));
     c->do_autospawn = 0;
 
+#ifndef MSG_NOSIGNAL
+#ifdef SIGPIPE    
+    pa_check_signal_is_blocked(SIGPIPE);
+#endif
+#endif
+
     c->conf = pa_client_conf_new();
     pa_client_conf_load(c->conf, NULL);
 #ifdef HAVE_X11
index 16c3631..7cb8520 100644 (file)
 
 #include "core-util.h"
 
+/* Not all platforms have this */
+#ifndef MSG_NOSIGNAL
+#define MSG_NOSIGNAL 0
+#endif
+
 #ifndef OS_IS_WIN32
 #define PA_RUNTIME_PATH_PREFIX "/tmp/pulse-"
 #define PATH_SEP '/'