If no spool file is set, the check_mail feature also causes multitail to wake up every 10 milliseconds.
This bug is easily verified using strace(1) or powertop(1): 1. unset the MAIL environmental variable (e.g. using `env -u MAIL`); 2. run multitail with the default setting of 'check_mail:5' in /etc/multitail.conf; and 3. use strace or powertop to see that multitail wakes up every 10ms because of timeout on select(2). 4. Then add 'check_mail:0' to ~/.multitailrc; 5. run multitail again; and 6. use strace or powertop to see that multitail calls select(2) without a timeout. The concerned routines are wait_for_keypress in mt.c and do_check_for_mail in misc.c. wait_for_keypress contains the select(2) loop for multitail. It also calls do_check_for_mail in every iteration of the select(2) loop. wait_for_keypress checks msf_last_check in computing the time until the mail next needs to be checked, and it uses this time as an upper bound for the timeout for the select(2) call. do_check_for_mail is supposed to reset msf_last_check to the current time whenever it checks mail. The problem is that if mail_spool_file is NULL, do_check_for_mail returns immediately. Thus msf_last_check is never updated, and wait_for_keypress always gives select(2) a very short timeout. Should I open a separate bug report regarding the excessive wakeups? I have a patch for this issue. -- Default config uses bad check_mail setting. https://bugs.launchpad.net/bugs/344163 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs