View Issue Details

IDProjectCategoryView StatusLast Update
00003831003.1(2008)/Issue 7Shell and Utilitiespublic2013-04-16 13:06
Reporterjilles Assigned Toajosey  
PrioritynormalSeverityEditorialTypeOmission
Status ClosedResolutionAccepted As Marked 
NameJilles Tjoelker
Organization
User Reference
Section2.9.5 Function Definition Command
Page Number2324
Line Number73374-73406
Interp Status---
Final Accepted Text0000383:0000692
Summary0000383: function with the same name as a special builtin
DescriptionThe 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 ActionChange

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.
Tagstc1-2008

Relationships

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

Activities

msbrown

2011-03-10 16:44

manager   bugnote:0000692

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 => 0000383:0000692
2011-09-22 15:35 nick Relationship added related to 0000465
2013-04-16 13:06 ajosey Status Resolved => Closed