Description of problem: When writing shell functions, I generally typeset -r all variables that I intend to use locally, but not alter, after they are set on the typeset line. However, when I do this with IFS, ksh fails on the next evaluation of "$(xxx)". Accesses like 'echo "IFS=$IFS"' do not cause any problem. Version-Release number of selected component (if applicable): Version M 1993-12-28 r ksh-20060214-1.1 How reproducible: file k1: ---- #!/bin/ksh function f1 { typeset -r IFS=" " echo "$(pwd)" } f1 ---- Steps to Reproduce: 1. ksh ./k1 2. 3. Actual results: k1[9]: f1: line 6: IFS: is read only Expected results: pwd output Additional info: This problem does not occur using pdksh or bash.
FC-6 is not supported any longer but the described behaviour can be reproduced on the recent ksh-20071105 in F-8 and Rawhide. I really don't know whether this is a bug or an intentional feature. Will check with the upstream. Changing the product version to devel.
It's a bug. The fix however doesn't exist yet. Let's see what I can do.
I have built new packages for F-8 and F-9 that should fix the issue. They should go to the testing repository soon.
ksh-20071105-2.fc8 has been pushed to the Fedora 8 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update ksh'
ksh-20071105-2.fc8 has been pushed to the Fedora 8 stable repository. If problems still persist, please make note of it in this bug report.