Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [alsa-devel] [PATCH] alsactl: don't exit on EINTR from epoll_wait().
@ 2019-10-15  4:36 Zev Weiss
  2020-04-12  2:15 ` Takashi Sakamoto
  0 siblings, 1 reply; 3+ messages in thread
From: Zev Weiss @ 2019-10-15  4:36 UTC (permalink / raw)
  To: alsa-devel; +Cc: Zev Weiss

Previously, things like attaching strace to a running 'alsactl monitor'
process would cause it to exit.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
---
 alsactl/monitor.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/alsactl/monitor.c b/alsactl/monitor.c
index 6b090e4f5c92..cf4167bee165 100644
--- a/alsactl/monitor.c
+++ b/alsactl/monitor.c
@@ -342,6 +342,8 @@ static int run_dispatcher(int epfd, int sigfd, int infd, struct list_head *srcs,
 
 		count = epoll_wait(epfd, epev, max_ev_count, 200);
 		if (count < 0) {
+			if (errno == EINTR)
+				continue;
 			err = count;
 			break;
 		}
-- 
2.23.0

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

end of thread, other threads:[~2020-04-14 13:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-15  4:36 [alsa-devel] [PATCH] alsactl: don't exit on EINTR from epoll_wait() Zev Weiss
2020-04-12  2:15 ` Takashi Sakamoto
2020-04-14 13:24   ` Jaroslav Kysela

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