View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000252 | 1003.1(2008)/Issue 7 | Shell and Utilities | public | 2010-05-06 19:54 | 2024-06-11 08:53 |
Reporter | eblake | Assigned To | ajosey | ||
Priority | normal | Severity | Objection | Type | Omission |
Status | Closed | Resolution | Accepted As Marked | ||
Name | Eric Blake | ||||
Organization | Red Hat | ||||
User Reference | ebb.dot | ||||
Section | dot | ||||
Page Number | 2341 | ||||
Line Number | 74025 | ||||
Interp Status | Approved | ||||
Final Accepted Text | 0000252:0000422 | ||||
Summary | 0000252: dot should follow Utility Syntax Guidelines | ||||
Description | The standard states in XCU 1.4 (line 71983) that "Standard utilities that do not accept options, but that do accept operands, shall recognize "−−" as a first argument to be discarded." However, it also states in XCU 2.14 (line 73830) that the special builtins are exempt unless stated otherwise: "Some of the special built-ins are described as conforming to XBD Utility Syntax Guidelines. For those that are not, the requirement in Utility Description Defaults that "--" be recognized as a first argument to be discarded does not apply and a conforming application shall not use that argument." This is okay for the bulk of the builtins. For example, break only takes one optional argument, but it is a positive integer, and never starts with -. And while some shells accept 'exit -- -1' as a synonym for 'exit 255', the standard already stated that an argument outside the range 0-255 is unspecified, so it does not matter whether exit does or does not support --. Likewise, eval can always be written with a quoted space prior to any other arguments, since that space will then be ignored. But for the dot builtin, it is very difficult to write portable code that can source a file whose name begins with '-'. Many existing implementations already support '. -- "$file"', and making this support mandatory will ease the burden of being able to do a PATH search for an arbitrary file used for sourcing. | ||||
Desired Action | At line 74031, add a new paragraph to the dot DESCRIPTION: The dot special built-in shall support XBD Section 12.2 (on page 215). | ||||
Tags | issue8 |
related to | 0000163 | Closed | ajosey | 1003.1(2008)/Issue 7 | Problems in rationale of trap shell builtin |
related to | 0001157 | Closed | 1003.1(2016/18)/Issue7+TC2 | major overhaul of exec special built-in | |
related to | 0000764 | Closed | ajosey | 1003.1(2008)/Issue 7 | Clarify the value of $0 with regards to the dot (.) command |
related to | 0001373 | Closed | 1003.1(2016/18)/Issue7+TC2 | The '[' utility does not conform to syntax guidelines 1 and 2 | |
related to | 0001440 | Closed | 1003.1(2016/18)/Issue7+TC2 | Calling `system("-some-tool")` fails (although it is a valid `sh` command) |
|
The exec special built-in has the same problem. |
|
The standard states that support for XBD Section 12.2 is not required, and conforming implementations must conform to this. However, concerns have been raised about this which are being referred to the sponsor. Rationale: ------------- See Description section. Notes to the Editor (not part of this interpretation): ------------------------------------------------------- At line 74031, add a new paragraph to the dot DESCRIPTION: The dot special built-in shall support XBD Section 12.2 (on page 215). after line 74152, add The exec special built-in shall support XBD Section 12.2 (on page 215). |
|
Comments/objections on the proposed interpretation are due by 31 Aug 2010 |
|
kre brought up the point that we introduced an internal inconsistency: the dot utility cannot comply with Guideline 1 or Guideline 2 of XBD Section 12.2 by virtue of its name. It may be worth a followup bug for a wording tweak to exempt those two guidelines. Similarly, the [ utility, as related to test, already documents that it is exempt from Guideline 10, but fails to document that it is exempt from Guidelines 1 and 2. |
|
Re: 0000252:0004768 I have updated the applied changes so that dot now says "shall support XBD Section 12.2 (on page NNN), except for Guidelines 1 and 2". The change history entry is:Austin Group Defect 252 is applied, adding a requirement for dot to support XBD Section 12.2 (except for Guidelines 1 and 2, since the utility's name is '.')This seemed like an obvious and non-controversial editorial fix, so I did not see the need to reopen the bug. A separate bug is needed to fix the related issue for '['. |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-05-06 19:54 | eblake | New Issue | |
2010-05-06 19:54 | eblake | Status | New => Under Review |
2010-05-06 19:54 | eblake | Assigned To | => ajosey |
2010-05-06 19:54 | eblake | Name | => Eric Blake |
2010-05-06 19:54 | eblake | Organization | => Red Hat |
2010-05-06 19:54 | eblake | User Reference | => ebb.dot |
2010-05-06 19:54 | eblake | Section | => dot |
2010-05-06 19:54 | eblake | Page Number | => 2341 |
2010-05-06 19:54 | eblake | Line Number | => 74025 |
2010-05-07 11:39 | geoffclare | Note Added: 0000418 | |
2010-05-27 16:30 | msbrown | Note Added: 0000422 | |
2010-05-27 16:30 | msbrown | Interp Status | => Pending |
2010-05-27 16:30 | msbrown | Final Accepted Text | => 0000252:0000422 |
2010-05-27 16:30 | msbrown | Status | Under Review => Interpretation Required |
2010-05-27 16:30 | msbrown | Resolution | Open => Accepted As Marked |
2010-05-28 13:20 | ajosey | Note Edited: 0000422 | |
2010-07-30 09:28 | ajosey | Interp Status | Pending => Proposed |
2010-07-30 09:28 | ajosey | Note Added: 0000508 | |
2010-09-03 06:21 | ajosey | Interp Status | Proposed => Approved |
2010-09-24 16:03 | geoffclare | Tag Attached: issue8 | |
2013-10-10 19:51 | eblake | Relationship added | related to 0000764 |
2016-02-23 21:36 | eblake | Relationship added | related to 0000163 |
2019-01-10 17:26 | eblake | Relationship added | related to 0001157 |
2020-01-31 14:55 | geoffclare | Status | Interpretation Required => Applied |
2020-02-04 15:32 | eblake | Note Added: 0004768 | |
2020-02-04 16:36 | geoffclare | Note Added: 0004769 | |
2020-07-14 09:01 | geoffclare | Relationship added | related to 0001373 |
2021-11-04 15:17 | eblake | Relationship added | related to 0001440 |
2024-06-11 08:53 | agadmin | Status | Applied => Closed |