Bug 752474 - ksh command "typeset -u" clears environment variables
Summary: ksh command "typeset -u" clears environment variables
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: ksh
Version: 16
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Michal Hlavinka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-09 16:04 UTC by schnitzer
Modified: 2011-11-10 10:49 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-10 10:49:59 UTC
Type: ---


Attachments (Terms of Use)

Description schnitzer 2011-11-09 16:04:28 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:

Always

Steps to Reproduce:
1. Create a file /tmp/test.sh with content

#!/bin/ksh
typeset -u X
echo X=$X

2. Make it executable

chmod u+x /tmp/test.sh

3. Execute it:

X=foo /tmp/test.sh
  
Actual results:

X=

Expected results:

X=FOO

Additional info:

Comment 1 Michal Hlavinka 2011-11-10 10:49:59 UTC
this is documented change:
10-10-07 +To reduce unwanted side effects, invoking typeset without the export
	  option and without an assignment now causes the variables to be unset
	  if the variable is inherited from the environment.


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