Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] An interrupted syscall is not an error when returning from poll() in audio/pcm_bluetooth.c
@ 2010-08-25  8:54 Colin Didier
  2010-08-25 11:28 ` Johan Hedberg
  0 siblings, 1 reply; 4+ messages in thread
From: Colin Didier @ 2010-08-25  8:54 UTC (permalink / raw)
  To: linux-bluetooth

Hello,

An interrupted syscall is not an error when returning from poll() at
line 240 of audio/pcm_bluetooth.c. So no need to freak out.

Here is a patch to fix this.

Cheers,
  Colin DIDIER

--- a/audio/pcm_bluetooth.c	2010-08-25 10:08:37.000000000 +0200
+++ b/audio/pcm_bluetooth.c	2010-08-25 10:08:59.000000000 +0200
@@ -237,9 +237,11 @@
 		ret = poll(fds, 2, poll_timeout);
 
 		if (ret < 0) {
-			SNDERR("poll error: %s (%d)", strerror(errno), errno);
-			if (errno != EINTR)
+			if (errno != EINTR) {
+				SNDERR("poll error: %s (%d)", strerror(errno),
+								errno);
 				break;
+			}
 		} else if (ret > 0) {
 			ret = (fds[0].revents) ? 0 : 1;
 			SNDERR("poll fd %d revents %d", ret, fds[ret].revents);

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-08-25 13:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-25  8:54 [PATCH] An interrupted syscall is not an error when returning from poll() in audio/pcm_bluetooth.c Colin Didier
2010-08-25 11:28 ` Johan Hedberg
2010-08-25 13:07   ` [PATCH] No error message on interrupted syscall Colin Didier
2010-08-25 13:29     ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox