View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000155 | 1003.1(2008)/Issue 7 | Shell and Utilities | public | 2009-09-22 11:24 | 2013-04-16 13:06 |
| Reporter | geoffclare | Assigned To | ajosey | ||
| Priority | normal | Severity | Objection | Type | Error |
| Status | Closed | Resolution | Accepted | ||
| Name | Geoff Clare | ||||
| Organization | The Open Group | ||||
| User Reference | |||||
| Section | 2.14 set | ||||
| Page Number | 2359 | ||||
| Line Number | 74590 | ||||
| Interp Status | Approved | ||||
| Final Accepted Text | 0000155:0000290 | ||||
| Summary | 0000155: set -u should require an error when $1 etc. are unset | ||||
| Description | A discussion on the austin-group-l mailing list in May 2009 identified a problem with the description of set -u. Since it uses the word "variable" instead of "parameter", the shell is not required to report an error if the positional parameters $1, $2, etc. are used when unset. This does not match existing practice. The question then arose of how to correct the problem, particularly the detail of whether set -u should apply to $@ and $*. It was felt that it should not apply to these, even though some shells do currently report an error for them, since it is normal and common for $@ and $* to be used in shell scripts regardless of whether they were passed any arguments. | ||||
| Desired Action | Change: "The shell shall write a message to standard error when it tries to expand a variable that is not set and immediately exit." to: "The shell shall write a message to standard error and immediately exit when it tries to expand an unset parameter other than the '@' and '*' special parameters." Add to RATIONALE for set after line 74714: "Historically some shells applied the -u option to all parameters including $@ and $*. The standard developers felt that this was a misfeature since it is normal and common for $@ and $* to be used in shell scripts regardless of whether they were passed any arguments. Treating these uses as an error when no arguments are passed reduces the value of -u for its intended purpose of finding spelling mistakes in variable names and uses of unset positional parameters." | ||||
| Tags | tc1-2008 | ||||
|
|
"The standard states "The shell shall write a message to standard error when it tries to expand a variable that is not set and immediately exit." and conforming implementations must conform to this. However, concerns have been raised about this which are being referred to the sponsor." |
|
|
Interpretation response ------------------------ The standard states "The shell shall write a message to standard error when it tries to expand a variable that is not set and immediately exit." and conforming implementations must conform to this. However, concerns have been raised about this which are being referred to the sponsor." Rationale: ------------- None. Notes to the Editor (not part of this interpretation): ------------------------------------------------------- Make the change suggested by the submitter |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2009-09-22 11:24 | geoffclare | New Issue | |
| 2009-09-22 11:24 | geoffclare | Status | New => Under Review |
| 2009-09-22 11:24 | geoffclare | Assigned To | => ajosey |
| 2009-09-22 11:24 | geoffclare | Name | => Geoff Clare |
| 2009-09-22 11:24 | geoffclare | Organization | => The Open Group |
| 2009-09-22 11:24 | geoffclare | Section | => 2.14 set |
| 2009-09-22 11:24 | geoffclare | Page Number | => 2359 |
| 2009-09-22 11:24 | geoffclare | Line Number | => 74590 |
| 2009-09-22 11:24 | geoffclare | Interp Status | => --- |
| 2009-09-24 15:57 | msbrown | Interp Status | --- => Pending |
| 2009-09-24 15:57 | msbrown | Note Added: 0000240 | |
| 2009-09-24 15:57 | msbrown | Status | Under Review => Interpretation Required |
| 2009-09-24 15:57 | msbrown | Resolution | Open => Accepted |
| 2009-11-07 07:27 | ajosey | Note Added: 0000290 | |
| 2009-11-07 07:28 | ajosey | Interp Status | Pending => Proposed |
| 2009-11-07 07:28 | ajosey | Final Accepted Text | => 0000155:0000290 |
| 2009-11-07 07:28 | ajosey | Note Edited: 0000290 | |
| 2009-11-07 07:28 | ajosey | Note Edited: 0000290 | |
| 2009-12-07 16:55 | ajosey | Interp Status | Proposed => Approved |
| 2010-09-21 11:19 | geoffclare | Tag Attached: tc1-2008 | |
| 2011-06-03 18:24 | eblake | Relationship added | related to 0000457 |
| 2012-04-26 17:18 | eblake | Relationship added | related to 0000559 |
| 2012-05-11 08:08 | geoffclare | Relationship added | related to 0000280 |
| 2013-04-16 13:06 | ajosey | Status | Interpretation Required => Closed |