]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
fix '100% CPU when paused' bug. debian 637546. But that's not the first report.
authorRoger Wolff <R.E.Wolff@BitWizard.nl>
Tue, 6 Aug 2013 05:53:57 +0000 (07:53 +0200)
committerRoger Wolff <R.E.Wolff@BitWizard.nl>
Tue, 6 Aug 2013 05:53:57 +0000 (07:53 +0200)
select.c

index e7c397e95255c714fd95f981174fa6a78aea04b9..9adec9bb32f5e417e109197375206488cb14b92a 100644 (file)
--- a/select.c
+++ b/select.c
@@ -106,7 +106,8 @@ void select_loop(void) {
     do {
       if(anyset || paused) {
        selecttime.tv_sec = 0;
-       selecttime.tv_usec = 0;
+       // timeout is 0.1s: Almost instantaneous for human operators.
+       selecttime.tv_usec = 100000; 
       
        rv = select(maxfd, (void *)&readfd, &writefd, NULL, &selecttime);