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
0000935 [1003.1(2013)/Issue7+TC1] Shell and Utilities Editorial Enhancement Request 2015-04-09 15:17 2019-06-10 08:54
Reporter rhansen View Status public  
Assigned To
Priority normal Resolution Accepted As Marked  
Status Closed  
Name Richard Hansen
Organization BBN
User Reference
Section 2.9.1.1 Command Search and Execution
Page Number 2339
Line Number 74384
Interp Status Approved
Final Accepted Text See Note: 0002614.
Summary 0000935: warn users away from naming functions after traditional built-ins
Description Many shells have additional built-ins beyond the standard utilities, and don't allow a user to define a shell function with the same name as the built-in. Add a list of traditional built-in utilities.

This bug is intended for Issue 7 TC1, so the list should be non-normative. A separate bug targeted for Issue 8 should be filed to make this list normative (reserved names).
Desired Action Between 1.a. and 1.b. add a note warning the user away from using the following names (specific text to be provided later):

alloc
autoload
bind
bindkey
builtin
bye
caller
cap
chdir (alias for cd)
clone
comp* (anything begining with comp) - but not compress? NO: use the explicit list:

comparguments
compcall
compctl
compdescribe
compfiles
compgen
compgroups
complete
compquote
comptags
comptry
compvalues
declare
dirs
disable
disown
dosh
echotc
echoti

help Note that "help" is part of the SCCS utilities on a historic UNIX system

history? hist?
let
local
login
logout
map
mapfile
pushd
popd
print
readarray
repeat
savehistory
source (already reserved?)
shopt
stop
suspend (needs to be intrinsic)
times
typeset
whence
Tags tc2-2008
Attached Files

- Relationships
related to 0000901New reserve _POSIX* shell option namespace for future use 

-  Notes
(0002614)
Don Cragun (manager)
2015-04-09 16:26
edited on: 2015-04-12 21:45

Interpretation response
------------------------
The standard states by omission that many utility names are available for use by application writers, and conforming implementations must conform to this. However, concerns have been raised about this which are being referred to the sponsor.

Rationale:
-------------
Almost all, if not all, existing shells have built-in utilities or keywords that are not defined by the standard. Many application writers already know to avoid these names, but the standard needs to clearly specify that these names are not available.

Notes to the Editor (not part of this interpretation):
-------------------------------------------------------
On page 2339 between lines 74383 and 74384, insert a new item:

b. If the command name matches the name of a utility listed in the following table, the results are unspecified:

alloc
autoload
bind
bindkey
builtin
bye
caller
cap
chdir
clone
comparguments
compcall
compctl
compdescribe
compfiles
compgen
compgroups
complete
compquote
comptags
comptry
compvalues
declare
dirs
disable
disown
dosh
echotc
echoti
help
history
hist
let
local
login
logout
map
mapfile
popd
print
pushd
readarray
repeat
savehistory
source
shopt
stop
suspend
typeset
whence

and renumber 1.b, c, and d to 1.c, d, and e.

On page 3693 after line 126371 insert a new paragraph:

Various historical implementations have used the names in item 1.b. as built-ins or reserved words. This standard does not specify their behavior, but their existance means that it is important for portable applications to avoid giving functions (or utilities in PATH) those names because the function (or utility in PATH) might not be executed as expected.


(0002620)
jilles (reporter)
2015-04-12 21:26

The name "times" should not be here, since it is a standard special builtin.
(0002621)
Don Cragun (manager)
2015-04-12 21:45

Re beignet:2620: You are correct. The entry for "times" will be removed from the list in a few minutes.
(0002627)
ajosey (manager)
2015-04-17 09:51

Interpretation proposed: 17 April 2015
(0002672)
ajosey (manager)
2015-05-18 09:07

Interpretation Approved: 18 May 2015

- Issue History
Date Modified Username Field Change
2015-04-09 15:17 rhansen New Issue
2015-04-09 15:17 rhansen Name => Richard Hansen
2015-04-09 15:17 rhansen Organization => BBN
2015-04-09 15:17 rhansen Section => 2.9.1.1 Command Search and Execution
2015-04-09 15:17 rhansen Page Number => 2339
2015-04-09 15:17 rhansen Line Number => 74384
2015-04-09 15:17 rhansen Interp Status => ---
2015-04-09 15:17 rhansen Relationship added related to 0000901
2015-04-09 16:26 Don Cragun Note Added: 0002614
2015-04-09 16:28 Don Cragun Interp Status --- => Pending
2015-04-09 16:28 Don Cragun Final Accepted Text => See Note: 0002614.
2015-04-09 16:28 Don Cragun Status New => Interpretation Required
2015-04-09 16:28 Don Cragun Resolution Open => Accepted As Marked
2015-04-09 16:28 Don Cragun Tag Attached: tc2-2008
2015-04-09 17:02 Don Cragun Note Edited: 0002614
2015-04-12 21:26 jilles Note Added: 0002620
2015-04-12 21:45 Don Cragun Note Added: 0002621
2015-04-12 21:45 Don Cragun Note Edited: 0002614
2015-04-17 09:51 ajosey Interp Status Pending => Proposed
2015-04-17 09:51 ajosey Note Added: 0002627
2015-05-18 09:07 ajosey Interp Status Proposed => Approved
2015-05-18 09:07 ajosey Note Added: 0002672
2019-06-10 08:54 agadmin Status Interpretation Required => Closed


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