Bug 683232

Summary: BASH checks mail when MAILCHECK=0, contrary to documentation.
Product: [Fedora] Fedora Reporter: Paul DeStefano <paul.destefano-redhat2>
Component: bashAssignee: Roman Rakus <rrakus>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 14CC: maxamillion, rrakus, tsmetana
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-08 23:02:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Paul DeStefano 2011-03-08 21:28:48 UTC
Description of problem:
BASH shell checks mail even when MAILCHECK=0, contrary to documentation bash(1).  Or, just update the documentation.  It cost me an hour just because I tried setting it to zero as suggested by the documentation, and it didn't work.  Both unset and -1 work as documented, but the one value I tried doesn't.  I think 0=always (check before every prompt), but the documentation says 0=never.

Version-Release number of selected component (if applicable):

GNU bash, version 4.1.7(1)-release (x86_64-redhat-linux-gnu)
from RPM bash-4.1.7-3.fc14.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. run bash, MAILCHECK=0
2. get new mail in $MAIL location (or fake it)
3. hit enter in bash shell
4. bash reports new mail
  
Actual results:
bash reports on $MAIL file status.

Expected results:
bash should ignore mail file entirely in accordance with environment settings.

Additional info:

Comment 1 Roman Rakus 2011-03-08 23:02:01 UTC
Reading a man page:
...or  set  to  a  value that is not a number greater than or equal to zero, the shell disables mail checking.

So if the number is equal to zero, the shell does not disable mail checking.

Comment 2 Paul DeStefano 2011-03-08 23:44:37 UTC
Doh!  Oops sorry.