[lttng-dev] [lttng-tools 2/2] Fix: relayd: revents may be 0 when using poll()
Philippe Proulx
eeppeliteloop at gmail.com
Wed Nov 26 16:29:19 EST 2014
Refs: #747
Signed-off-by: Philippe Proulx <eeppeliteloop at gmail.com>
---
src/bin/lttng-relayd/main.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c
index 00b8735..07cb8f5 100644
--- a/src/bin/lttng-relayd/main.c
+++ b/src/bin/lttng-relayd/main.c
@@ -2499,6 +2499,11 @@ restart:
health_code_update();
+ /* Do not waste time if no returned events for this fd */
+ if (!revents) {
+ continue;
+ }
+
/* Thread quit pipe has been closed. Killing thread. */
ret = check_thread_quit_pipe(pollfd, revents);
if (ret) {
--
2.1.3
More information about the lttng-dev
mailing list