Description of problem: ksh returns exit level 1 on when unsetting a variable that was unset Version-Release number of selected component (if applicable): Version : 20080202 Release : 2.el5 How reproducible: It is always reproduciable. Steps to Reproduce: #1 export foo=test #2 echo $foo test #3 unset foo #4 echo $? 0 #5 echo $bar -ksh: bar: parameter not set #6 unset bar #7 echo $? 1 Actual results: ksh returns 1 on when unsetting a variable that was unset Expected results: ksh should returns 0 on when unsetting a variable that was unset Additional info: bash returns 0 on when unsetting a variable that was unset.
this was fixed in ksh version 2009-01-20: 09-01-14 The unset built-in was modified to return 0 exit status when unsetting a variable that was unset to conform with the POSIX standard.
Created attachment 349952 [details] patch, backported from upstream
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2010-0234.html