event/MultiSocketMonitor: add workaround for /dev/null

The ALSA "null" driver opens /dev/null and returns the file handle
from snd_pcm_poll_descriptors(), but /dev/null cannot be used with
epoll, the epoll_ctl() system call returns -EPERM.  This means that
the ALSA output hangs, eventually freezing the whole MPD process.

This commit adds a workaround to the MultiSocketMonitor class which is
used by the ALSA output plugin.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/695
This commit is contained in:
Max Kellermann
2019-12-20 13:54:16 +01:00
parent d75a0d714e
commit 9a577f8060
3 changed files with 57 additions and 1 deletions

2
NEWS
View File

@@ -1,4 +1,6 @@
ver 0.21.18 (not yet released)
* output
- alsa: fix hang bug with ALSA "null" outputs
* reduce unnecessary CPU wakeups
ver 0.21.17 (2019/12/16)