From 5830fc726ac9294641592a8c007502d573f6dea1 Mon Sep 17 00:00:00 2001 From: Zev Weiss Date: Mon, 14 Oct 2019 23:36:50 -0500 Subject: [PATCH] alsactl: don't exit on EINTR from epoll_wait(). Previously, things like attaching strace to a running 'alsactl monitor' process would cause it to exit. Signed-off-by: Zev Weiss Reviewed-by: Takashi Sakamoto Tested-by: Takashi Sakamoto Signed-off-by: Jaroslav Kysela --- 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.16.4