View Issue Details

IDProjectCategoryView StatusLast Update
00013101003.1(2016/18)/Issue7+TC2Shell and Utilitiespublic2024-06-11 09:08
Reportergeoffclare Assigned To 
PrioritynormalSeverityObjectionTypeError
Status ClosedResolutionAccepted 
NameGeoff Clare
OrganizationThe Open Group
User Reference
Sectionvi
Page Number3416
Line Number115215
Interp Status---
Final Accepted Text
Summary0001310: CONSEQUENCES OF ERRORS for vi tries to define undefined behaviour
DescriptionThe CONSEQUENCES OF ERRORS section for vi has text beginning:
When any error is encountered and the standard input is not a terminal device file, ...

However, the STDIN section states "If standard input is not a terminal device, the results are undefined."
Desired ActionChange:
When any error is encountered and the standard input is not a terminal device file, vi shall not write the file or return to command or text input mode, and shall terminate with a non-zero exit status.

Otherwise, when ...
to:
When ...
Tagstc3-2008

Activities

kre

2020-01-06 23:57

reporter   bugnote:0004707

An alternative resolution might be to change line 113704 (page 3375)
(this is the line quoted in the Description of this issue from the STDIN
section) so that it says something like:

    If standard input is not a terminal device, and no error is detected,
    the results are undefined. If an error occurs, see below in the
    CONSEQUENCES OF ERRORS for the appropriate result.

Note: do not read this as a strong preference for this version over the
Desired Action, I just have a general preference for less undefined cases
rather than more whenever it is possible. Here I am not sure what actual
vi implementations do when input is not a terminal (when some error occurs).

Also, does this really need (when there is no error, and perhaps when there
is) to be undefined, rather than unspecified?

Issue History

Date Modified Username Field Change
2019-12-19 17:49 geoffclare New Issue
2019-12-19 17:49 geoffclare Name => Geoff Clare
2019-12-19 17:49 geoffclare Organization => The Open Group
2019-12-19 17:49 geoffclare Section => vi
2019-12-19 17:49 geoffclare Page Number => 3416
2019-12-19 17:49 geoffclare Line Number => 115215
2019-12-19 17:49 geoffclare Interp Status => ---
2020-01-06 23:57 kre Note Added: 0004707
2020-01-30 17:26 Don Cragun Status New => Resolved
2020-01-30 17:26 Don Cragun Resolution Open => Accepted
2020-01-30 17:26 Don Cragun Tag Attached: tc3-2008
2020-03-13 12:10 geoffclare Status Resolved => Applied
2024-06-11 09:08 agadmin Status Applied => Closed