summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2006-07-17 11:26:29 +0000
committerPierre Ossman <ossman@cendio.se>2006-07-17 11:26:29 +0000
commit4b352e5fac5ff546315139f7b791074261544f66 (patch)
treeb00f94f39f16fcd98d09cf8769188fd313d48d96
parentba31adcf3ebb542931fb6d66f2e1fc7689dfc712 (diff)
Restore SIGPIPE warning when the platform doesn't have MSG_NOSIGNAL.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1097 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r--src/pulse/context.c6
-rw-r--r--src/pulsecore/core-util.c5
2 files changed, 11 insertions, 0 deletions
diff --git a/src/pulse/context.c b/src/pulse/context.c
index 5724765b..228053bc 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -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
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index 16c3631f..7cb85209 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -78,6 +78,11 @@
#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 '/'