mirror of https://github.com/mpv-player/mpv
client API: document requirement to block SIGPIPE
I noticed that the IPC code does not use MSG_NOSIGNAL or SO_NOSIGPIPE. The former is "only" POSIX 2008 and also requires switching to sendto(), while the latter is even less portable. Not going to bother with this obsolete 80ies crap, just block SIGPIPE, and instruct client API users to do the same.
This commit is contained in:
parent
37210f0cbc
commit
dab7602a89
|
@ -117,6 +117,8 @@ extern "C" {
|
|||
* (used through libass), ALSA, FFmpeg, and possibly more.
|
||||
* - The FPU precision must be set at least to double precision.
|
||||
* - On Windows, mpv will call timeBeginPeriod(1).
|
||||
* - SIGPIPE should be blocked. Some parts rely on this signal not crashing the
|
||||
* process (such as ffmpeg OpenSSL support, or the mpv IPC code).
|
||||
* - On memory exhaustion, mpv will kill the process.
|
||||
*
|
||||
* Embedding the video window
|
||||
|
|
|
@ -488,7 +488,7 @@ int terminal_init(void)
|
|||
setsigaction(SIGTTIN, SIG_IGN, 0, true);
|
||||
setsigaction(SIGTTOU, SIG_IGN, 0, true);
|
||||
|
||||
// don't crash on SIGPIPE caused by semi-broken libraries
|
||||
// get sane behavior, instead of hysteric UNIX-nonsense
|
||||
setsigaction(SIGPIPE, SIG_IGN, 0, true);
|
||||
|
||||
getch2_poll();
|
||||
|
|
Loading…
Reference in New Issue