From: Jaroslav Kysela Date: Wed, 24 Aug 2005 14:13:47 +0000 (+0000) Subject: PCM API - handle EINTR from poll() in snd_pcm_wait() function X-Git-Tag: v1.0.10rc2~23 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=745062ee01ef89fa9b61dbf18df91bcb5c53b7f4;p=alsa-lib.git PCM API - handle EINTR from poll() in snd_pcm_wait() function --- diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c index 1f2cba86..8fe02cd5 100644 --- a/src/pcm/pcm.c +++ b/src/pcm/pcm.c @@ -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);