summaryrefslogtreecommitdiffstats
path: root/osdep/terminal-unix.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-05-11 17:38:35 +0200
committerwm4 <wm4@nowhere>2015-05-11 17:38:35 +0200
commit4858c47e1c6ea51bad409fa8ee56aeb05a7a3778 (patch)
treec939f9371122633365895b9f78fbf854a36ca5b6 /osdep/terminal-unix.c
parenta5aa58c63c6f0b1ee43d8ac90e0ae0dd57de194a (diff)
downloadmpv-4858c47e1c6ea51bad409fa8ee56aeb05a7a3778.tar.bz2
mpv-4858c47e1c6ea51bad409fa8ee56aeb05a7a3778.tar.xz
Always block SIGPIPE globally
OpenSSL and GnuTLS are still causing this problem (although FFmpeg could be blamed as well - but not really). In particular, it was happening to libmpv users and in cases the pseudo-gui profile is used. This was because all signal handling is in the terminal code, so if terminal is disabled, it won't be set. This was obviously a questionable shortcut. Avoid further problems by always blocking the signal. This is done even for libmpv, despite our policy of not messing with global state. Explicitly document this in the libmpv docs. It turns out that a version bump to 1.17 was forgotten for the addition of MPV_FORMAT_BYTE_ARRAY, so document that change as part of 1.16.
Diffstat (limited to 'osdep/terminal-unix.c')
-rw-r--r--osdep/terminal-unix.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/osdep/terminal-unix.c b/osdep/terminal-unix.c
index f43376b088..478b613999 100644
--- a/osdep/terminal-unix.c
+++ b/osdep/terminal-unix.c
@@ -488,9 +488,6 @@ int terminal_init(void)
setsigaction(SIGTTIN, SIG_IGN, 0, true);
setsigaction(SIGTTOU, SIG_IGN, 0, true);
- // get sane behavior, instead of hysteric UNIX-nonsense
- setsigaction(SIGPIPE, SIG_IGN, 0, true);
-
getch2_poll();
return 0;