Bug 956 - bash exits with 1 instead of 0.
Summary: bash exits with 1 instead of 0.
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: bash   
(Show other bugs)
Version: 5.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-01-25 06:17 UTC by Michael G Schwern
Modified: 2008-05-01 15:37 UTC (History)
0 users

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: ---


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.