From adf8ddcdc19cf1670269bf8654eb72f5dce658f6 Mon Sep 17 00:00:00 2001 From: Gerrie Roos Date: Tue, 10 Jan 2012 09:00:42 +0200 Subject: [PATCH] exec plugin: incorrectly exited select loop on signal. Sometimes dead modules won't be started up correctly or running ones would not generate stats anymore. Problem manifests more often under load and on multicore hw Change-Id: Ifb70a74c0cd55fc421b65a1f4332147916eadb70 Signed-off-by: Florian Forster --- src/exec.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/exec.c b/src/exec.c index 639b5d45..c48d85f5 100644 --- a/src/exec.c +++ b/src/exec.c @@ -580,10 +580,18 @@ static void *exec_read_one (void *arg) /* {{{ */ /* We use a copy of fdset, as select modifies it */ copy = fdset; - while (select(highest_fd + 1, ©, NULL, NULL, NULL ) > 0) + while (1) { int len; + status = select (highest_fd + 1, ©, NULL, NULL, NULL); + if (status < 0) + { + if (errno == EINTR) + continue; + break; + } + if (FD_ISSET(fd, ©)) { char *pnl; -- 2.11.0