* [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* Re: [PATCH] An interrupted syscall is not an error when returning from poll() in audio/pcm_bluetooth.c
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
0 siblings, 1 reply; 4+ messages in thread
From: Johan Hedberg @ 2010-08-25 11:28 UTC (permalink / raw)
To: Colin Didier; +Cc: linux-bluetooth
Hi Colin,
On Wed, Aug 25, 2010, Colin Didier wrote:
> 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.
The patch itself seems fine, but the same comments apply for the commit
message as with your other patch. I.e. prepare with git format-patch and
make sure that you don't have overly long lines (e.g. the summary line
is much too long in this one).
Johan
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] No error message on interrupted syscall
2010-08-25 11:28 ` Johan Hedberg
@ 2010-08-25 13:07 ` Colin Didier
2010-08-25 13:29 ` Johan Hedberg
0 siblings, 1 reply; 4+ messages in thread
From: Colin Didier @ 2010-08-25 13:07 UTC (permalink / raw)
To: Johan Hedberg; +Cc: linux-bluetooth
An interrupted syscall is not an error when returning from poll().
---
audio/pcm_bluetooth.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/audio/pcm_bluetooth.c b/audio/pcm_bluetooth.c
index ff463fe..799f17f 100644
--- a/audio/pcm_bluetooth.c
+++ b/audio/pcm_bluetooth.c
@@ -237,9 +237,11 @@ iter_sleep:
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);
--
1.7.1
^ permalink raw reply related [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