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
0000383 [1003.1(2008)/Issue 7] Shell and Utilities Editorial Omission 2011-02-18 23:35 2013-04-16 13:06
Reporter jilles View Status public  
Assigned To ajosey
Priority normal Resolution Accepted As Marked  
Status Closed  
Name Jilles Tjoelker
Organization
User Reference
Section 2.9.5 Function Definition Command
Page Number 2324
Line Number 73374-73406
Interp Status ---
Final Accepted Text Note: 0000692
Summary 0000383: function with the same name as a special builtin
Description The command search in 2.9.1.1 means that a function with the same name as a special builtin (such as export) cannot be called.

Section 2.9.5 Function Definition Command allows function definitions to fail with a non-zero exit status but does not specify conditions for this.

It does not really make much sense to me to allow defining a function but not calling it.

In ksh93, trying to define a function with the same name as a special builtin is a run-time fatal error. In dash, it is a parse error. Therefore, forbidding functions with the same name as a special builtin is existing practice in some implementations.
Desired Action Change

The function is named fname; the application shall ensure that it is a name (see XBD Section 3.230, on page 70).

to

The function is named fname; the application shall ensure that it is a name (see XBD Section 3.230, on page 70) and that it does not match the name of a special built-in utility.
Tags tc1-2008
Attached Files

- Relationships
related to 0000465Appliedajosey is the list of special built-ins exhaustive (is "local" special)? 

-  Notes
(0000692)
msbrown (manager)
2011-03-10 16:44

Change

The function is named fname; the application shall ensure that it is a name (see XBD Section 3.230, on page 70).

to

The function is named fname; the application shall ensure that it is a name (see XBD Section 3.230, on page 70) and that it is not the name of a special built-in utility.

- Issue History
Date Modified Username Field Change
2011-02-18 23:35 jilles New Issue
2011-02-18 23:35 jilles Status New => Under Review
2011-02-18 23:35 jilles Assigned To => ajosey
2011-02-18 23:35 jilles Name => Jilles Tjoelker
2011-02-18 23:35 jilles Section => 2.9.5 Function Definition Command
2011-02-18 23:35 jilles Page Number => 2324
2011-02-18 23:35 jilles Line Number => 73374-73406
2011-03-10 16:43 msbrown Tag Attached: tc1-2008
2011-03-10 16:44 msbrown Interp Status => ---
2011-03-10 16:44 msbrown Note Added: 0000692
2011-03-10 16:44 msbrown Status Under Review => Resolved
2011-03-10 16:44 msbrown Resolution Open => Accepted As Marked
2011-03-10 16:45 msbrown Final Accepted Text => Note: 0000692
2011-09-22 15:35 nick Relationship added related to 0000465
2013-04-16 13:06 ajosey Status Resolved => Closed


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