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
1 changed files with 1 additions and 1 deletions

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);