From 745062ee01ef89fa9b61dbf18df91bcb5c53b7f4 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Wed, 24 Aug 2005 14:13:47 +0000 Subject: [PATCH] PCM API - handle EINTR from poll() in snd_pcm_wait() function --- src/pcm/pcm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- 2.47.1