mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-12-15 08:56:36 -05:00
PCM API - handle EINTR from poll() in snd_pcm_wait() function
This commit is contained in:
parent
62b9d00ad6
commit
745062ee01
1 changed files with 4 additions and 1 deletions
|
|
@ -2240,8 +2240,11 @@ int snd_pcm_wait_nocheck(snd_pcm_t *pcm, int timeout)
|
||||||
}
|
}
|
||||||
do {
|
do {
|
||||||
err_poll = poll(pfd, npfds, timeout);
|
err_poll = poll(pfd, npfds, timeout);
|
||||||
if (err_poll < 0)
|
if (err_poll < 0) {
|
||||||
|
if (errno == EINTR)
|
||||||
|
continue;
|
||||||
return -errno;
|
return -errno;
|
||||||
|
}
|
||||||
if (! err_poll)
|
if (! err_poll)
|
||||||
break;
|
break;
|
||||||
err = snd_pcm_poll_descriptors_revents(pcm, pfd, npfds, revents);
|
err = snd_pcm_poll_descriptors_revents(pcm, pfd, npfds, revents);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue