]> git.alsa-project.org Git - alsa-lib.git/commitdiff
PCM API - handle EINTR from poll() in snd_pcm_wait() function
authorJaroslav Kysela <perex@perex.cz>
Wed, 24 Aug 2005 14:13:47 +0000 (14:13 +0000)
committerJaroslav Kysela <perex@perex.cz>
Wed, 24 Aug 2005 14:13:47 +0000 (14:13 +0000)
src/pcm/pcm.c

index 1f2cba86191b01318249e0219955f26c4869c9cc..8fe02cd558f32fa7a35d296ac6be3fc9f87ea223 100644 (file)
@@ -2240,8 +2240,11 @@ int snd_pcm_wait_nocheck(snd_pcm_t *pcm, int timeout)
        }
        do {
                err_poll = poll(pfd, npfds, timeout);
-               if (err_poll < 0)
+               if (err_poll < 0) {
+                       if (errno == EINTR)
+                               continue;
                        return -errno;
+                }
                if (! err_poll)
                        break;
                err = snd_pcm_poll_descriptors_revents(pcm, pfd, npfds, revents);