Description of problem: In some internal testing with moderately sized scripts (see attachments), I have found that the exit status reported in the "$?" parameter can sometimes be incorrect, and unrelated to the actual exit statuses of child processes. I bave only detected this problem with ksh-20050202-0.4E.4. I have a single line patch (attached) which properly initialises the structure member that was added in the "exit19" patch (appears to be a backport for RHBZ 232640, which I cannot see the details for). Version-Release number of selected component (if applicable): ksh-20050202-0.4E.4 How reproducible: Run my test script (with accompanying "large1" file) as follows: ksh ./test_mkdir 1 > _output Actual results: The _output file should report a number of failures of the form: "Failed with status=<some random number>" Expected results: The _output file should only have lines like the following: "Success" Additional info: My "exitfix" patch corrects the ksh executable so that only the expected result is seen for the 150 attemnpts to execute a child mkdir.
Created attachment 303925 [details] Test script (also see attached file "large1")
Created attachment 303926 [details] Contains a number of functions for total script size > 50K
Created attachment 303927 [details] Patch to fix the (sometimes) incorrect exit status
This issue should be fixed in ksh-20050202-0.5E.4 that is about to be released in RHEL 4.7. The testing packages that contain all the recent changes can be downloaded from http://tsmetana.fedorapeople.org/ksh/el4-test/ Note these are unofficial and unsupported -- just if you wish to test them yourself to verify everything works OK for you.
If you can't verify the testing packages I'll close this bug as a duplicate of bug #429153 because I failed to reproduce the problem with the new version.
(In reply to comment #5) > If you can't verify the testing packages I'll close this bug as a duplicate of > bug #429153 because I failed to reproduce the problem with the new version. Sorry it has taken so long to get back on this particular issue, but I have finally had some time to verify that the ksh contained in the rpm at: http://tsmetana.fedorapeople.org/ksh/el4-test/ksh-20050202-0.5E.4.i386.rpm does NOT have the same return status issue described in this bug report. The test_mkdir test script (which shows a number of failures with ksh-0.5E-4) has _no_ failures with the new proposed ksh at the above URL. I look forward to the 4.7 release bundle with a new ksh!
Thanks for the testing. Closing. *** This bug has been marked as a duplicate of 429153 ***