From 425e3a42da7c33555fd9201e2974183318ef88a7 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Thu, 7 Apr 2011 21:23:06 +1200 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/ModPoll.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/comm/ModPoll.cc b/src/comm/ModPoll.cc index 095d0b56e4..d4a884d1e0 100644 --- a/src/comm/ModPoll.cc +++ b/src/comm/ModPoll.cc @@ -414,7 +414,7 @@ Comm::DoSelect(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 @@ -428,7 +428,7 @@ Comm::DoSelect(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.3