Austin Group Defect Tracker

Aardvark Mark IV


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0000562 [1003.1(2008)/Issue 7] Shell and Utilities Editorial Omission 2012-05-03 18:39 2012-05-10 15:15
Reporter mscotts View Status public  
Assigned To ajosey
Priority normal Resolution Duplicate  
Status Closed  
Name Matthew Story
Organization NYC*BUG
User Reference
Section 2.9.1
Page Number online
Line Number online
Interp Status ---
Final Accepted Text
Summary 0000562: Optional Arguments Setting Current Execution Environment Is Not Noted for functions (only for built-ins)
Description From section 2.9.1:

Otherwise, the variable assignments shall be exported for the execution environment of the command and shall not affect the current execution environment (except for special built-ins).

This exception should also include functions. Like special built-ins functions are also found via the Command Search and Execution and executed in the current execution environment (which necessitates that the current execution environment be altered for the required behavior).



Desired Action The text in 2.9.1 (Simple Commands):

Otherwise, the variable assignments shall be exported for the execution environment of the command and shall not affect the current execution environment (except for special built-ins).

should be modified to read:

Otherwise, the variable assignments shall be exported for the execution environment of the command and shall not affect the current execution environment (except for special built-ins and functions).
Tags No tags attached.
Attached Files

- Relationships
duplicate of 0000255Closedajosey shell expansions in assignments that precede a command name 

-  Notes
(0001229)
mscotts (reporter)
2012-05-03 18:45

One additional note, I have verified that the exemption of functions is already the existing behavior for FreeBSD sh, dash and bash. It is likely the same for other shells as well.
(0001230)
chet_ramey (reporter)
2012-05-03 20:11

It's already specified to behave that way.

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_05 [^]

reads, in part:

When a function is executed, it shall have the syntax-error and variable-assignment properties described for special built-in utilities in the enumerated list at the beginning of Special Built-In Utilities .

We should make the suggested change for completeness.
(0001231)
mscotts (reporter)
2012-05-03 21:23

I had read that bit, my understanding of the Variable Assignment directive in 2.14 is for the a case like the following:

$ eval HI=foo
$ echo $HI
foo

or ... for functions:

$ foo() { HI=foo; }
$ foo
$ echo $HI
foo

not for the case of variable assignment via simple command. Although I certainly may have misunderstood that particular directive.
(0001232)
geoffclare (manager)
2012-05-04 08:09

This is already being fixed in TC1. See 0000255.

- Issue History
Date Modified Username Field Change
2012-05-03 18:39 mscotts New Issue
2012-05-03 18:39 mscotts Status New => Under Review
2012-05-03 18:39 mscotts Assigned To => ajosey
2012-05-03 18:39 mscotts Name => Matthew Story
2012-05-03 18:39 mscotts Organization => NYC*BUG
2012-05-03 18:39 mscotts Section => 2.9.1
2012-05-03 18:39 mscotts Page Number => online
2012-05-03 18:39 mscotts Line Number => online
2012-05-03 18:45 mscotts Note Added: 0001229
2012-05-03 18:49 eadler Issue Monitored: eadler
2012-05-03 20:11 chet_ramey Note Added: 0001230
2012-05-03 21:23 mscotts Note Added: 0001231
2012-05-04 08:09 geoffclare Note Added: 0001232
2012-05-04 08:10 geoffclare Relationship added duplicate of 0000255
2012-05-10 15:15 geoffclare Interp Status => ---
2012-05-10 15:15 geoffclare Status Under Review => Closed
2012-05-10 15:15 geoffclare Resolution Open => Duplicate


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker