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: Evgeniy Dushistov
Subject: Re: [PATCH] MAILPATH stopped working after update to Bash 4.0
Date: Sun, 25 Oct 2009 22:50:47 +0300
User-agent: Mutt/1.5.20 (2009-06-14)

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.  Has
> > the mail notification feature changed in Bash 4.0?  I can't see anything
> > relevant in the man page or NEWS file.
> 
> There was a small change made to the mail file initialization code, to
> keep from dropping the first "new mail" notification.  (In April, 2007,
> though, so you'd figure one of the testers would have caught a problem
> before now.)
> 
> 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,
so I made such changes:

--- mailcheck-vanilla.c 2009-10-25 22:44:33.000000000 +0300
+++ mailcheck.c 2009-10-25 22:45:33.000000000 +0300
@@ -193,6 +193,7 @@ add_mail_file (file, msg)
 
   mailfiles[i] = alloc_mail_file (filename, msg);
   init_mail_file (i);
+  update_mail_file (i);
 
   return i;
 }


and at now I not see any problems,
comments?

-- 
/Evgeniy





reply via email to

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