Hello, I am noticing that mailcheck is missing some emails while comparing the files' modification time with the lastmailcheck. It is also missing any emails created/received while the mailcheck process is running. I am attaching the patch that fixes the issue. This is my first patch to zsh, hence, am not sure if it adheres to any guidelines. This is a sample of what I noticed on a dual core machine. date ; echo "mailcheck: $MAILCHECK" ; echo "testing again 123456" | mail -s `echo $USER` joe@localhost Fri Aug 9 10:19:03 CDT 2013 mailcheck: 1 - (0:i:~) - - - - - - - - - - - - - - - - date ; echo "mailcheck: ${MAILCHECK}" ; echo "testing again 123456" | mail -s `echo $USER` joe@localhost Fri Aug 9 10:19:14 CDT 2013 mailcheck: 1 - (0:c:~) - - - - - - - - - - - - - - - - date ; echo "mailcheck: " ${MAILCHECK} ; echo "testing again 123456" | mail -s `echo $USER` joe@localhost Fri Aug 9 10:19:23 CDT 2013 mailcheck: 1 - (0:c:~) - - - - - - - - - - - - - - - - date ; echo "mailcheck: " ${MAILCHECK} ; echo "testing again 123456" | mail -s `echo $USER` joe@localhost Fri Aug 9 10:19:27 CDT 2013 mailcheck: 1 - (0:i:~) - - - - - - - - - - - - - - - - date ; echo "mailcheck: " ${MAILCHECK} ; echo "testing again 123456" | mail -s `echo $USER` joe@localhost Fri Aug 9 10:19:29 CDT 2013 mailcheck: 1 - (0:i:~) - - - - - - - - - - - - - - - - date ; echo "mailcheck: " ${MAILCHECK} ; echo "testing again 123456" | mail -s `echo $USER` joe@localhost Fri Aug 9 10:19:30 CDT 2013 mailcheck: 1 - (0:i:~) - - - - - - - - - - - - - - - - date ; echo "mailcheck: " ${MAILCHECK} ; echo "testing again 123456" | mail -s `echo $USER` joe@localhost Fri Aug 9 10:19:31 CDT 2013 mailcheck: 1 - (0:i:~) - - - - - - - - - - - - - - - - date ; echo "mailcheck: " ${MAILCHECK} ; echo "testing again 123456" | mail -s `echo $USER` joe@localhost Fri Aug 9 10:19:32 CDT 2013 mailcheck: 1 /home/j/var/maildir maildir has new mail - (0:i:~) - - - - - - - - - - - - - - - - date ; echo "mailcheck: " ${MAILCHECK} ; echo "testing again 123456" | mail -s `echo $USER` joe@localhost Fri Aug 9 10:19:43 CDT 2013 mailcheck: 1 - (0:i:~) - - - - - - - - - - - - - - - - date ; echo "mailcheck: " ${MAILCHECK} ; echo "testing again 123456" | mail -s `echo $USER` joe@localhost Fri Aug 9 10:19:44 CDT 2013 mailcheck: 1 - (0:i:~) - - - - - - - - - - - - - - - - date ; echo "mailcheck: " ${MAILCHECK} ; echo "testing again 123456" | mail -s `echo $USER` joe@localhost Fri Aug 9 10:19:46 CDT 2013 mailcheck: 1 /home/j/var/maildir maildir has new mail - (0:i:~) - - - - - - - - - - - - - - - - date ; echo "mailcheck: " ${MAILCHECK} ; echo "testing again 123456" | mail -s `echo $USER` joe@localhost Fri Aug 9 10:20:22 CDT 2013 mailcheck: 1 - (0:i:~) - - - - - - - - - - - - - - - - date ; echo "mailcheck: " ${MAILCHECK} ; echo "testing again 123456" | mail -s `echo $USER` joe@localhost Fri Aug 9 10:20:23 CDT 2013 mailcheck: 1 - (0:i:~) - - - - - - - - - - - - - - - - date ; echo "mailcheck: " ${MAILCHECK} ; echo "testing again 123456" | mail -s `echo $USER` joe@localhost Fri Aug 9 10:20:24 CDT 2013 mailcheck: 1 /home/j/var/maildir maildir has new mail - (0:i:~) - - - - - - - - - - - - - - - - date ; echo "mailcheck: " ${MAILCHECK} ; echo "testing again 123456" | mail -s `echo $USER` joe@localhost Fri Aug 9 10:20:25 CDT 2013 mailcheck: 1 - (0:i:~) - - - - - - - - - - - - - - - - date ; echo "mailcheck: " ${MAILCHECK} ; echo "testing again 123456" | mail -s `echo $USER` joe@localhost Fri Aug 9 10:20:26 CDT 2013 mailcheck: 1 /home/j/var/maildir maildir has new mail - (0:i:~) - - - - - - - - - - - - - - - - date ; echo "mailcheck: " ${MAILCHECK} ; echo "testing again 123456" | mail -s `echo $USER` joe@localhost Fri Aug 9 10:20:27 CDT 2013 mailcheck: 1 - (0:i:~) - - - - - - - - - - - - - - - - date ; echo "mailcheck: " ${MAILCHECK} ; echo "testing again 123456" | mail -s `echo $USER` joe@localhost Fri Aug 9 10:20:27 CDT 2013 mailcheck: 1 /home/j/var/maildir maildir has new mail - (0:i:~) - - - - - - - - - - - - - - - - date ; echo "mailcheck: " ${MAILCHECK} ; echo "testing again 123456" | mail -s `echo $USER` joe@localhost Fri Aug 9 10:20:28 CDT 2013 mailcheck: 1 - (0:i:~) - - - - - - - - - - - - - - - - date ; echo "mailcheck: " ${MAILCHECK} ; echo "testing again 123456" | mail -s `echo $USER` joe@localhost Fri Aug 9 10:20:29 CDT 2013 mailcheck: 1 - (0:i:~) - - - - - - - - - - - - - - - - date ; echo "mailcheck: " ${MAILCHECK} ; echo "testing again 123456" | mail -s `echo $USER` joe@localhost Fri Aug 9 10:20:30 CDT 2013 mailcheck: 1 /home/j/var/maildir maildir has new mail - (0:i:~) - - - - - - - - - - - - - - - - date ; echo "mailcheck: " ${MAILCHECK} ; echo "testing again 123456" | mail -s `echo $USER` joe@localhost Fri Aug 9 10:20:36 CDT 2013 mailcheck: 1 - (0:i:~) - - - - - - - - - - - - - - - - Thanks Joe
Attachment:
0001-mailcheck-is-missing-new-emails-on-a-dual-core-machi.patch
Description: Binary data