*Synopsis*: Creating a compound variable in a subshell "bleeds through" to the
calling subshell
CR 6713682 changed on Jun 12 2008 by <User 1-6Y4MMS>
=== Field ============ === New Value ============= === Old Value =============
Synopsis Creating a compound varia.. Creating a compound varia..
====================== =========================== ===========================
*Change Request ID*: 6713682
*Synopsis*: Creating a compound variable in a subshell "bleeds through" to the
calling subshell
Product: solaris
Category: shell
Subcategory: korn93
Type: Defect
Subtype: Functionality
Status: 1-Dispatched
Substatus:
Priority: 3-Medium
Introduced In Release:
Introduced In Build:
Responsible Engineer:
Keywords:
=== *Description* ============================================================
Creating a compound variable in s subshell "bleeds through" to the calling
subshell in some conditions.
Example:
-- snip --
$ ksh93 -c 'unset l ; ( l=( a=1 b="BE" ) ; print "$l" ) ; print $l'
(
a=1
b=BE
)
( )
-- snip --
The first bracket pair is Ok since it's coming from $ print "$l" # , however
the 2nd pair comes from the print $l _outside_ the subshell where the variable
"l" should no longer exist.
Workaround:
Force ksh93 to call |fork()| for the matching subshell using $ ulimit -c #,
e.g. ...
-- snip --
$ ksh93 -c 'unset l ; ( ulimit -c 0 ; l=( a=1 b="BE" ) ; print "$l" ) ; print
$l'
(
a=1
b=BE
)
-- snip --
... provides the correct output.
*** (#1 of 1): 2008-06-12 03:32:11 GMT+00:00 <User 1-6Y4MMS>
=== *Workaround* =============================================================
Use $ ulimit -c0 # in a subshell to force ksh93 to |fork()|-
*** (#1 of 1): [ UNSAVED ] <email address omitted>
*** (#1 of 1): 2008-06-12 03:32:11 GMT+00:00 <User 1-6Y4MMS>
=== *Additional Details* =====================================================
Targeted Release:
Commit To Fix In Build:
Fixed In Build:
Integrated In Build:
Verified In Build:
See Also:
Duplicate of:
Hooks:
Hook1: <email address omitted>
Hook2: <email address omitted>
Hook3:
Hook4:
Hook5:
Hook6:
Program Management:
Root Cause:
Fix Affects Documentation: No
Fix Affects Localization: No
=== *History* ================================================================
Date Submitted: 2008-06-12 03:32:10 GMT+00:00
Submitted By: <User 1-6Y4MMS>
Status Changed Date Updated Updated By
=== *Service Request* ========================================================
Impact: Significant
Functionality: Secondary
Severity: 3
Product Name: solaris
Product Release: solaris_nevada
Product Build:
Operating System: solaris
Hardware: generic
Submitted Date: 2008-06-12 03:32:11 GMT+00:00
=== *Multiple Release (MR) Cluster* - 0 ======================================