Austin Group Defect Tracker

Aardvark Mark III

Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0001123 [1003.1(2013)/Issue7+TC1] Shell and Utilities Objection Clarification Requested 2017-03-04 07:56 2017-03-04 07:56
Reporter kre View Status public  
Assigned To
Priority normal Resolution Open  
Status New  
Name Robert Elz
User Reference
Section 2.6
Page Number 2353
Line Number 75006-75007
Interp Status ---
Final Accepted Text
Summary 0001123: Problematic specification of execution environment for word expansions
Description Section 2.6 says ...

    The expansions described in this section shall occur in the same shell
    environment as that in which the command is executed.

which makes no sense, first because the expansions are not always being
performed on behalf of a command about to be executed (consider the case
of expanding one of the PSn prompts) and second, because at the time the
expansions are done, we do not yet know what command is to be executed,
and hence, we do not know which execution environment is to be used.

                case "${something}" in
                a) command=exec;;
                b) command=echo;;
                *) command=;;

                ${command} ls "${X=3}"

which environment is to be used when expanding ${command} ?

if we had something=a then because exec is a special builtin, the current
(command line processing) environment is to be used. In the other cases,
a new execution environment is created. But until we have expanded ${command}
we don't know which.

In this particular example, it probably makes no real difference, but it is
easy to come up with others (not involving exec) where it does matter.
Desired Action Right now, no idea... Completely re-do section 2.6 to make it rational
would be a good first step.
Tags No tags attached.
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2017-03-04 07:56 kre New Issue
2017-03-04 07:56 kre Name => Robert Elz
2017-03-04 07:56 kre Section => 2.6
2017-03-04 07:56 kre Page Number => 2353
2017-03-04 07:56 kre Line Number => 75006-75007

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