View Issue Details

IDProjectCategoryView StatusLast Update
00012981003.1(2016/18)/Issue7+TC2Shell and Utilitiespublic2024-06-11 09:08
Reportergeoffclare Assigned To 
PrioritynormalSeverityObjectionTypeClarification Requested
Status ClosedResolutionAccepted 
NameGeoff Clare
OrganizationThe Open Group
User Reference
Sectioned
Page Number2689
Line Number87713
Interp Status---
Final Accepted Text
Summary0001298: ed CONSEQUENCES OF ERRORS unclear about diagnostic message
DescriptionThe CONSEQUENCES OF ERRORS section on the ed page says:
If the standard input is a regular file, ed shall terminate with a non-zero exit status.

Notice that it does not say a diagnostic message needs to be written.

Section 1.4 Utility Description Defaults, under CONSEQUENCES OF ERRORS, says:
The following shall apply to each utility, unless otherwise stated:

[...]

* When an unrecoverable error condition is encountered, the utility shall exit with a non-zero exit status.

* A diagnostic message shall be written to standard error whenever an error condition occurs.

It is possible to interpret the statement on the ed page as triggering the "otherwise stated" here, since it states something that is already one of the bullet items in the defaults and thus can be seen as a replacement for the whole bullet list. This is almost certainly not intended (if it was, the ed page would explicitly say that a diagnostic message need not be written), but it would be good to remove any doubt.

The ex page has a similar problem.

Another problem with above quote from the ed page is that it only covers the case where standard input is a regular file. It should apply to other non-terminal file types (e.g. pipes) as well, like it does for ex.
Desired ActionOn page 2689 line 87713 section ed, change:
If the standard input is a regular file, ed shall terminate with a non-zero exit status.
to:
If the standard input is a not a terminal device file, ed shall behave as described under CONSEQUENCES OF ERRORS in [xref to 1.4].

On page 2743 line 89810 section ex, change:
When any error is encountered and the standard input is not a terminal device file, ex shall not write the file or return to command or text input mode, and shall terminate with a non-zero exit status.
to:
When any error is encountered and the standard input is not a terminal device file, in addition to the default requirements described in [xref to 1.4], ex shall neither write the file (if one has been opened) nor return to command or text input mode.
Tagstc3-2008

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2019-11-01 16:16 geoffclare New Issue
2019-11-01 16:16 geoffclare Name => Geoff Clare
2019-11-01 16:16 geoffclare Organization => The Open Group
2019-11-01 16:16 geoffclare Section => ed
2019-11-01 16:16 geoffclare Page Number => 2689
2019-11-01 16:16 geoffclare Line Number => 87713
2019-11-01 16:16 geoffclare Interp Status => ---
2019-12-16 16:15 Don Cragun Status New => Resolved
2019-12-16 16:15 Don Cragun Resolution Open => Accepted
2019-12-16 16:15 Don Cragun Desired Action Updated
2019-12-16 16:15 Don Cragun Tag Attached: tc3-2008
2020-01-29 15:06 geoffclare Status Resolved => Applied
2024-06-11 09:08 agadmin Status Applied => Closed