From 1b5b23b94849b18bedd458fd83741fa07d840c7b Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 15 Sep 2016 13:13:23 +0200 Subject: client API: remove SIGPIPE overriding code This workaround prevented that libmpv users could accidentally crash when the SIGPIPE signal was triggered by FFmpeg's OpenSSL/GnuTLS usage. But it also modifies the global signal handler state, so remove it now that this workaround is not required anymore. --- input/ipc-unix.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'input') diff --git a/input/ipc-unix.c b/input/ipc-unix.c index 0f4b7132e4..f5c8886a28 100644 --- a/input/ipc-unix.c +++ b/input/ipc-unix.c @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -97,6 +98,11 @@ static void *client_thread(void *p) { pthread_detach(pthread_self()); + // We don't use MSG_NOSIGNAL because the moldy fruit OS doesn't support it. + struct sigaction sa = { .sa_handler = SIG_IGN, .sa_flags = SA_RESTART }; + sigfillset(&sa.sa_mask); + sigaction(SIGPIPE, &sa, NULL); + int rc; struct client_arg *arg = p; -- cgit v1.2.3