summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-05-14 21:42:46 +0200
committerwm4 <wm4@nowhere>2020-05-14 21:42:46 +0200
commit0049ea38be72884fabeee3ce52e2d6796c3abd53 (patch)
tree99079dc43efdd5dc8e3bf81ef7bc49fbfa71d076 /input
parent26bd8479d0fe165d9afbc84a1680ad43209d9058 (diff)
downloadmpv-0049ea38be72884fabeee3ce52e2d6796c3abd53.tar.bz2
mpv-0049ea38be72884fabeee3ce52e2d6796c3abd53.tar.xz
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).
Diffstat (limited to 'input')
-rw-r--r--input/ipc-unix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/input/ipc-unix.c b/input/ipc-unix.c
index b237efa1a0..abef0972d9 100644
--- a/input/ipc-unix.c
+++ b/input/ipc-unix.c
@@ -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 };