This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 956 - bash exits with 1 instead of 0.
bash exits with 1 instead of 0.
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: bash (Show other bugs)
5.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-01-25 01:17 EST by Michael G Schwern
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-03-18 11:38:01 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Michael G Schwern 1999-01-25 01:17:29 EST
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 11:38:59 EST
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.