Anonymous | Login | 2024-04-28 07:13 UTC |
Main | My View | View Issues | Change Log | Docs |
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 | ||||||
|
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. |
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |