Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 956 - bash exits with 1 instead of 0.
Summary: bash exits with 1 instead of 0.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: bash
Version: 5.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
URL:
Whiteboard:
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:
Clone Of:
Environment:
Last Closed: 1999-03-18 16:38:01 UTC


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.