An interrupted syscall is not an error when returning from poll() in audio/pcm_bluetooth.c
PATCH 1/1 An interrupted syscall is not an error when returning from poll() in audio/pcm_bluetooth.c
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
audio/pcm_bluetooth.c +4 -2
@@ -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);
Hi Colin,
Quoted 4 lines · Colin Didier
An interrupted syscall is not an error when returning from
poll()at line 240 ofaudio/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
PATCH 1/1 No error message on interrupted syscall
An interrupted syscall is not an error when returning from poll().
--- audio/pcm_bluetooth.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
audio/pcm_bluetooth.c +4 -2
@@ -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);
Signature · 1 line
1.7.1
Re: [PATCH] No error message on interrupted syscall
Hi Colin,
Quoted 4 lines · Colin Didier
An interrupted syscall is not an error when returning from
poll().--- audio/pcm_bluetooth.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
This one has also been pushed upstream. Thanks.
Johan