[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bash mailcheck bug
Bash mailcheck bug
Thu, 20 Dec 2001 14:47:40 -0600
After years of waiting for bash to be able to run my Korn shell
aliases properly, I finally bit the bullet and switched my login
shells to bash2.
Everything has been fine, except that every time I get email, bash
notifies me on every single xterm the next time I hit enter. This
could be hours after I have read the email with bash. This never
happened to me with Korn shell. I'd get the notification on
one xterm, read the mail with mutt, and then none of my other
xterm sessions would bug me about it.
I finally couldn't stand it anymore, so I went into the source code.
Here's the problem code:
/* If the user has just run a program which manipulates the
mail file, then don't bother explaining that the mail
file has been manipulated. Since some systems don't change
the access time to be equal to the modification time when
the mail in the file is manipulated, check the size also. If
the file has not grown, continue. */
if ((atime >= mtime) && !file_is_bigger)
Well, even though the atime is greater than the mtime after I've read
the mail with mutt, the file will always be bigger because, except for
spam, I *never* delete or file my email. Email stays in my incoming
box right where it will be staring me in the face for easy reference
or to remind me that I have to do something.
It seems to me that the logic really ought to be just a simple:
if (atime >= mtime)
Possibly, you might want to add a new option that some people (though
I can't think who) might want to set which says to keep nagging you if
the mail file is bigger.
Rick Richardson address@hidden http://home.mn.rr.com/richardsons/
Twin Cities traffic animations are at http://tctraffic.0catch.com/
Scientists will achieve human immortality by 2100. Do you want the
government (you) to pay for *me* to live forever? Think about *that* before
voting for government insurance programs. I could be around a long time.
- Bash mailcheck bug,
Rick Richardson <=