Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Zev Weiss <zev@bewilderbeest.net>
To: alsa-devel@alsa-project.org
Cc: Zev Weiss <zev@bewilderbeest.net>
Subject: [alsa-devel] [PATCH] alsactl: don't exit on EINTR from epoll_wait().
Date: Mon, 14 Oct 2019 23:36:50 -0500	[thread overview]
Message-ID: <20191015043650.23536-1-zev@bewilderbeest.net> (raw)

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

             reply	other threads:[~2019-10-17  6:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15  4:36 Zev Weiss [this message]
2020-04-12  2:15 ` [PATCH] alsactl: don't exit on EINTR from epoll_wait() Takashi Sakamoto
2020-04-14 13:24   ` Jaroslav Kysela

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191015043650.23536-1-zev@bewilderbeest.net \
    --to=zev@bewilderbeest.net \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox