1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-16 12:17:12 +00:00

ipc: exit client if the FD is invalid

This does not normally happen. But since the --input-ipc-client option
can pass in raw FDs, it's probably a good thing in the interest of
making mistakes obvious. Without this, it just burned a core on invalid
FDs (poll() always returned immediately).
This commit is contained in:
wm4 2020-05-14 21:42:46 +02:00
parent 26bd8479d0
commit 0049ea38be

View File

@ -163,7 +163,7 @@ static void *client_thread(void *p)
}
}
if (fds[1].revents & (POLLIN | POLLHUP)) {
if (fds[1].revents & (POLLIN | POLLHUP | POLLNVAL)) {
while (1) {
char buf[128];
bstr append = { buf, 0 };