From: R.E. Wolff Date: Wed, 21 Aug 2013 15:23:31 +0000 (+0200) Subject: fixed 100% CPU bug when paused X-Git-Tag: v0.86~26 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0512f4a2c46b88255176c734b093d652411decf6;p=thirdparty%2Fmtr.git fixed 100% CPU bug when paused --- diff --git a/NEWS b/NEWS index ca1f4ee..fba1692 100644 --- a/NEWS +++ b/NEWS @@ -8,9 +8,10 @@ V0.86 Fixed default hostname logic. -- Vladimir Yakovetsky, REW. Fixed failure on IPv4 only systems when IPv6 was available at compile time. -- REW. + Fixed (longstanding) bug that mtr used 100% cpu when paused. + Cosmetic changes from Richard Hartman. - -V0.85 fixed asn support. (better compile time detection of required features) +V0.85 Fixed asn support. (better compile time detection of required features) support for multiple hostnames. (fixed in 0.86) V0.84 Fix some glib things by Thomas. diff --git a/select.c b/select.c index e46d697..29088fd 100644 --- a/select.c +++ b/select.c @@ -111,7 +111,7 @@ void select_loop(void) { * this prevents mtr from hogging 100% CPU time on one core. */ selecttime.tv_sec = 0; - selecttime.tv_usec = 100000; + selecttime.tv_usec = paused?100000:0; rv = select(maxfd, (void *)&readfd, &writefd, NULL, &selecttime);