bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] MAILPATH stopped working after update to Bash 4.0


From: Nikos Chantziaras
Subject: Re: [PATCH] MAILPATH stopped working after update to Bash 4.0
Date: Mon, 26 Oct 2009 17:57:05 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20091019 Thunderbird/3.0b4

On 10/26/2009 04:16 AM, Chet Ramey wrote:
Evgeniy Dushistov wrote:
On Tue, May 26, 2009 at 04:11:23PM -0400, Chet Ramey wrote:
Nikos Chantziaras wrote:
I have:

   MAILPATH="/home/me/.maildir/new?You have new mail."
   MAILCHECK=60

Bash 3.2 was correctly telling me about new mail arriving.  However,
after I updated to Bash 4.0, I constantly get a "You have new mail."
message every minute even though I actually don't have new mail.
[...]
There was a small change made to the mail file initialization code, to
keep from dropping the first "new mail" notification.  [...]

I don't use a maildir-aware mail program, but you can debug this by
setting a breakpoint in mailcheck.c:check_mail().

I recently faced with the same problem, when package manager update
my bash from 3.x to 4.x.
I compared mailcheck.c from 3.2 and 4.0, and see only logic difference
in add_mail_file. When it function handle new file, it not read it's
date information as it was in 3.x, but set it to zero,

The change to use init_mail_file was intentional, but it doesn't set
the mod time and access time to 0.  It initializes a mailpath entry,
but doesn't call mailstat on the file until it's actually checking mail.
Changing it back to call update_mail_file defeats the purpose of the
change, which is to avoid calling mailstat and reading a potentially
very large maildir until MAILCHECK is set and we need to.

It also seems to defeat the purpose of getting informed about new mail :P




reply via email to

[Prev in Thread] Current Thread [Next in Thread]