Bug 405381 - ksh will not handle $(xxx) when typeset -r IFS
ksh will not handle $(xxx) when typeset -r IFS
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: ksh (Show other bugs)
rawhide
i686 Linux
low Severity low
: ---
: ---
Assigned To: Tomas Smetana
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-29 23:54 EST by Clay Harris
Modified: 2008-01-15 17:57 EST (History)
0 users

See Also:
Fixed In Version: 20071105-2.fc8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-01-15 17:57:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Clay Harris 2007-11-29 23:54:37 EST
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.
Comment 1 Tomas Smetana 2007-11-30 05:46:37 EST
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.
Comment 2 Tomas Smetana 2007-11-30 10:21:25 EST
It's a bug.  The fix however doesn't exist yet.  Let's see what I can do.
Comment 3 Tomas Smetana 2008-01-08 03:09:28 EST
I have built new packages for F-8 and F-9 that should fix the issue.  They
should go to the testing repository soon.
Comment 4 Fedora Update System 2008-01-11 17:07:36 EST
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'
Comment 5 Fedora Update System 2008-01-15 17:57:37 EST
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.

Note You need to log in before you can comment on or make changes to this bug.