View Issue Details

IDProjectCategoryView StatusLast Update
00004432008-TC1Shell and Utilitiespublic2011-05-19 16:26
Reporterjilles Assigned Toajosey  
PrioritynormalSeverityObjectionTypeOmission
Status ClosedResolutionRejected 
Product VersionDraft 1 
NameJilles Tjoelker
Organization
User Reference
Section2.8.1 Consequences of Shell Errors, 2.14 dot, 2.14 eval
Page Number2315,2341,2343
Line Number73050-73051,74053,74110
Interp Status---
Final Accepted Text
Summary0000443: poor wording about errors in interactive shells
DescriptionVarious pieces of text suggest that interactive shells continue executing a command after errors (albeit with $? != 0) that would cause a non-interactive shell to exit. This does not seem very useful and does not match most implementations. Most implementations abort the commands currently in progress, set $? to a value greater than 0 and return to the prompt.

Change Number XCU/TC1/D1/0023 [114] makes this worse, suggesting that an interactive shell continue executing after an error in dot. For example, I would expect the following to print an error message, and no "continued" message:

$ . /nonexistent; echo continued $?

Change Number: XCU/TC1/D1/0025 [114] makes this worse, suggesting that an interactive shell continue executing after an error in eval.

My assumption is that if something is mentioned explicitly in the "Exit status" subsection of a description of a special built-in utility in 2.14, this means that the shell continues executing commands after the special builtin; in other words, "shall exit" errors from 2.8.1 are not mentioned there.
Desired ActionIn 2.8.1 Consequences of Shell Errors, change

In all of the cases shown in the table, an interactive shell shall write a diagnostic message to standard error without exiting.

to

If any of the errors shown as ‘‘shall exit’’ or ‘‘(may) exit’’ occur in an interactive shell, the shell shall write a diagnostic message to standard error, set $? to a value greater than 0 and return to the prompt.

In 2.14 dot, do not apply XCU/TC1/D1/0023 [114]. If the section is not clear enough, it may be necessary to clarify that if the dot script cannot be found or opened it is a "Dot script not found" error per 2.8.1 and if the commands cannot be parsed it is a "Shell language syntax error" per 2.8.1.

In 2.14 eval, do not apply XCU/TC1/D1/0025 [114].
TagsNo tags attached.

Relationships

related to 0000114 Closedajosey 1003.1(2008)/Issue 7 dot exit status 

Activities

ajosey

2011-05-19 16:02

manager   bugnote:0000786

We have recategorized this item as an objection (note it was erroneously accepted at one point) and this item is open.

Don Cragun

2011-05-19 16:26

manager   bugnote:0000787

Last edited: 2011-05-19 16:29

The changes suggested here may have merit, but (since they don't reflect
existing practice) would not be suitable for a technical corrigenda.

We believe that this issue should be raised against the current standard
and the resolution should be targeted to the next revision.

We recommend filing a new bug (of type enhancement request) against
Issue 7 to address this issue.

Issue History

Date Modified Username Field Change
2011-05-14 17:40 jilles New Issue
2011-05-14 17:40 jilles Status New => Under Review
2011-05-14 17:40 jilles Assigned To => ajosey
2011-05-14 17:40 jilles Name => Jilles Tjoelker
2011-05-14 17:40 jilles Section => 2.8.1 Consequences of Shell Errors, 2.14 dot, 2.14 eval
2011-05-14 17:40 jilles Page Number => 2315,2341,2343
2011-05-14 17:40 jilles Line Number => 73050-73051,74053,74110
2011-05-16 09:14 geoffclare Relationship added related to 0000114
2011-05-19 15:37 ajosey Interp Status => ---
2011-05-19 15:37 ajosey Resolution Open => Accepted
2011-05-19 16:02 ajosey Note Added: 0000786
2011-05-19 16:02 ajosey Severity Editorial => Objection
2011-05-19 16:02 ajosey Resolution Accepted => Open
2011-05-19 16:26 Don Cragun Note Added: 0000787
2011-05-19 16:26 Don Cragun Status Under Review => Closed
2011-05-19 16:26 Don Cragun Resolution Open => Rejected
2011-05-19 16:29 Don Cragun Note Edited: 0000787