Anonymous | Login | 2025-02-14 18:07 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 | ||
0001390 | [1003.1(2016/18)/Issue7+TC2] Shell and Utilities | Objection | Omission | 2020-08-13 19:54 | 2021-01-28 17:10 | ||
Reporter | kre | View Status | public | ||||
Assigned To | |||||||
Priority | normal | Resolution | Rejected | ||||
Status | Closed | ||||||
Name | Robert Elz | ||||||
Organization | |||||||
User Reference | |||||||
Section | XCU 2.9.1.1 (In Issue 8 draft 1, section 2.9.1.4) | ||||||
Page Number | 2367-8 (in Issue 8 draft 1: 2293-4) | ||||||
Line Number | 75545-75627 (In Issue 8 Draft 1, lines 74140-74183) | ||||||
Interp Status | --- | ||||||
Final Accepted Text | |||||||
Summary | 0001390: No method to invoke a non-standard built-in utility | ||||||
Description |
The procedures in XCU 2.9.1.1 (which is 2.9.1.4 in Issue 8 draft 1) and specifically sub-section 1 of that section, specify how to choose an actual command to invoke given a command name that does not contain a slash. All shells implement some built-in commands. The standard specifies the procedures to invoke the special built-in commands, a set of specific built-in commands (in Issue 8 called Intrinsic built-in commands) and built-in commands that are standard utilities. The specification of the last form is incorrect, as noted in 0001389 but that is immaterial here. However some shells (most shells?) provide extra built-in utilities that are not standard utilities, not intrinsic utilities, and not special built-in utilities. The standard as currently written provides no mechanism to allow such non-standard built-in utilities to be invoked. If 0001389 is resolved as accepted, either as written, or in some substantially similar fashion, this bug can be closed, as it will have already been resolved. If 0001389 is rejected, then a change will be needed to allow for non-standard built-in utilities to be invoked. This is because (sub-sections of 2.9.1.1 1) a does not apply, the built-in is not a special built-in b can be assumed not to apply, at least most of the time, the new built-in will not have one of the designated names. c does not apply, the command to be invoked is not defined as a function d does not apply, the command name of the relevant utility is not one of those listed. e is all that remains, and specifies a PATH search to locate the utility. That search fails, as the built-in in question is not implemented as a file system command. Note that XCU 1.6 requires ant standard utility implemented as a built-in to also be available for use via one of the exec() family of functions, but nothing is required in a similar fashion for non-standard utilities. A shell is entitled to implement a new non-standard utility as a built-in without making it also available in the filesystem. Since this search fails 2.9.1.1 1.e.ii applies, and specifies: If the search is unsuccessful, the command shall fail with That is, any attempt to invoke a non-standard built-in utility is required to fail (as written, this is not optional, it is mandatory). Shells that implement non-standard built-in utilities (most of them) do not act like that, and instead invoke the utility, just like any other built-in utility. An example of such a built-in is the "jobid" built-in from the NetBSD (and FreeBSD) shells, which maps between shell job identifiers (%% etc) and lead process id's (process group id) of the job (and so makes no sense at all to implement outside the shell, as job identifiers exist only as an internal shell notation). The standard needs to be amended to correct this omission. |
||||||
Desired Action |
In section 2.9.1.1 1.d after the wordsIf the command name matches the name of the type or ulimit add the new clause or matches the name of any non-standard As amended (to become 2.9.1.4 1.d in Issue 8 draft 1), the relevant change is to add after the words: If the command name matches the name of an intrinsic utility add the new clause or matches the name of any non-standard Note that the words to be added are the same, but the text that precedes them has altered between Issue 7 and Issue 8. In either case the text that follows that utility shall be invoked. is unchanged, as is the list of command names that follows in Issue 7. |
||||||
Tags | No tags attached. | ||||||
Attached Files | |||||||
|
![]() |
|||||||||||
|
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |