Configuration Information [Automatically generated, do not change]: Machine: i386 OS: netbsdelf3.0 Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='netbsdelf3.0' -DCONF_MACHTYPE='i386-unknown-netbsdelf3.0' -DCONF_VENDOR='unknown' -DLOCALEDIR='/pkg/bash-3.2/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -I./lib/intl -I/devel/build/NetBSD/bash/bash-3.2/lib/intl -Wl,-Map,/tmp/pipes/bash-3.2 uname output: NetBSD panix5.panix.com 3.1_RC3 NetBSD 3.1_RC3 (PANIX-35) #0: Wed Oct 18 22:28:22 EDT 2006 [EMAIL PROTECTED]:/devel/netbsd/3.1-RC3/src/sys/arch/i386/compile/PANIX-35 i386 Machine Type: i386-unknown-netbsdelf3.0
Bash Version: 3.2 Patch Level: 0 Release Status: release Description: Some of our customers have large inboxes in maildir format (thousands of messages). bash is very inefficient when used to check mail files this way, because it loops over the entire maildir/new and maildir/cur directories whenever it checks mail. We thus tried to turn off mail checking in /etc/profile. But code like this in /etc/profile: unset MAILCHECK MAIL=$HOME/.maildir/ still provokes a complete walk of the maildir directory (observed via ktrace). The culprit appears to be the mailstat() function, which is called whenever the value of MAIL is changed (from sv_mail): #0 0x080b05e1 in mailstat () #1 0x0807ff46 in update_mail_file () #2 0x0808018d in add_mail_file () #3 0x0808065b in remember_mail_dates () #4 0x08066cae in sv_mail () Repeat-By: set /etc/profile to "unset MAILCHECK; MAIL=/large/user/.maildir" $ ktrace bash -l bash> exit # show how many times maildir was referenced: $ kdump | grep -c /large/user/.maildir Fix: Don't ever call mailstat() if MAILCHECK is not set? _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash