Bug 752474

Summary: ksh command "typeset -u" clears environment variables
Product: [Fedora] Fedora Reporter: schnitzer
Component: kshAssignee: Michal Hlavinka <mhlavink>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 16CC: mhlavink
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-10 10:49:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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.