1
0
mirror of https://github.com/ericonr/sndio.git synced 2024-02-18 04:45:21 -06:00

rmidi is not blocking as well

This commit is contained in:
Alexandre Ratchov 2012-10-26 10:55:57 +02:00
parent dc9bbf8f45
commit 9f6bcbbc0e

View File

@ -75,7 +75,7 @@ mio_rmidi_open(const char *str, unsigned int mode, int nbio)
flags = O_RDWR;
else
flags = (mode & MIO_OUT) ? O_WRONLY : O_RDONLY;
while ((fd = open(path, flags)) < 0) {
while ((fd = open(path, flags | O_NONBLOCK)) < 0) {
if (errno == EINTR)
continue;
DPERROR(path);