mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
control, pcm: implement snd_ctl_abort() and snd_pcm_abort() functions
Upon an interrupt, it is necessary to abort the wait loops with the EINTR error code. Introduce snd_*_abort() functions to handle this case. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
730c833dd8
commit
e23fb2c4de
7 changed files with 17 additions and 4 deletions
|
|
@ -696,7 +696,7 @@ int snd_hctl_wait(snd_hctl_t *hctl, int timeout)
|
|||
pollio = 0;
|
||||
err_poll = poll(pfd, npfds, timeout);
|
||||
if (err_poll < 0) {
|
||||
if (errno == EINTR)
|
||||
if (errno == EINTR && !CTLINABORT(hctl->ctl))
|
||||
continue;
|
||||
return -errno;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue