Bug 956

Summary: bash exits with 1 instead of 0.
Product: [Retired] Red Hat Linux Reporter: Michael G Schwern <schwern>
Component: bashAssignee: David Lawrence <dkl>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-03-18 16:38: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:
Embargoed:

Description Michael G Schwern 1999-01-25 06:17:29 UTC
Using bash-1.14.7-11 and bash-1.14.7-13 /bin/bash will exit
with a status of 1 rather than 0.  I believe this is
incorrect behavior.

/bin/bash -c exit;
echo $?

or

if /bin/bash -c exit; then
	echo 'Good'
else
	echo 'Bad'
fi

illustrates the problem.


The problem was noticed when I attempted to configure
perl5.005_03 Trial 3 and it warned me "It would appear you
have a defective bash shell installed...  Upgrading to a
recent version (1.14.4 or later) should fix the problem."

Comment 1 David Lawrence 1999-03-18 16:38:59 UTC
doing

/bin/bash -c exit;
echo $?

returned a 0 in bash-1.14.7-14.i386.rpm
as reported is the proper way by user.