From 1f88d3454e8d78affc57f27571edbb0782b850e5 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Mon, 18 Apr 2011 05:48:02 -0600 Subject: [PATCH] Fix ModPoll signedness checks This npending test bug was preventing any poll() errors from being noticed and displayed. Possibly leading to some of the weird hanging reports we have been unable to replicate. --- src/comm_poll.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/comm_poll.cc b/src/comm_poll.cc index 9b00ea3631..637901d563 100644 --- a/src/comm_poll.cc +++ b/src/comm_poll.cc @@ -402,7 +402,7 @@ comm_select(int msec) * Note that this will only ever trigger when there are no log files * and stdout/err/in are all closed too. */ - if (nfds == 0 && !npending) { + if (nfds == 0 && npending == 0) { if (shutting_down) return COMM_SHUTDOWN; else @@ -416,7 +416,7 @@ comm_select(int msec) ++statCounter.select_loops; PROF_stop(comm_poll_normal); - if (num >= 0 || npending >= 0) + if (num >= 0 || npending > 0) break; if (ignoreErrno(errno)) -- 2.47.2