From 7fb39a9cd5b0a6a805209d35bc08506056aefa92 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Tue, 23 Aug 2005 12:54:26 +0000 Subject: [PATCH] aplay - added -EINTR error code handling for read/write operations --- aplay/aplay.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/aplay/aplay.c b/aplay/aplay.c index 658ad3f..2103ec8 100644 --- a/aplay/aplay.c +++ b/aplay/aplay.c @@ -1178,6 +1178,8 @@ static ssize_t pcm_write(u_char *data, size_t count) xrun(); } else if (r == -ESTRPIPE) { suspend(); + } else if (r == -EINTR) { + continue; } else if (r < 0) { error(_("write error: %s"), snd_strerror(r)); exit(EXIT_FAILURE); @@ -1220,6 +1222,8 @@ static ssize_t pcm_writev(u_char **data, unsigned int channels, size_t count) xrun(); } else if (r == -ESTRPIPE) { suspend(); + } else if (r == -EINTR) { + continue; } else if (r < 0) { error(_("writev error: %s"), snd_strerror(r)); exit(EXIT_FAILURE); @@ -1259,6 +1263,8 @@ static ssize_t pcm_read(u_char *data, size_t rcount) xrun(); } else if (r == -ESTRPIPE) { suspend(); + } else if (r == -EINTR) { + continue; } else if (r < 0) { error(_("read error: %s"), snd_strerror(r)); exit(EXIT_FAILURE); @@ -1298,6 +1304,8 @@ static ssize_t pcm_readv(u_char **data, unsigned int channels, size_t rcount) xrun(); } else if (r == -ESTRPIPE) { suspend(); + } else if (r == -EINTR) { + continue; } else if (r < 0) { error(_("readv error: %s"), snd_strerror(r)); exit(EXIT_FAILURE);