Austin Group Defect Tracker

Aardvark Mark IV


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0001498 [1003.1(2016/18)/Issue7+TC2] Shell and Utilities Objection Clarification Requested 2021-08-06 11:14 2022-01-06 10:37
Reporter geoffclare View Status public  
Assigned To
Priority normal Resolution Accepted  
Status Applied  
Name Geoff Clare
Organization The Open Group
User Reference
Section diff
Page Number 2663
Line Number 86756
Interp Status ---
Final Accepted Text
Summary 0001498: diff exit status when an error occurs while writing the differences
Description The EXIT STATUS section for diff includes:
1 Differences were found.

>1 An error occurred.
If differences are found but an error occurs when the differences are being written to standard output, then both of these descriptions are true, and the standard does not specify a precedence between them, which means that at first sight conforming implementations can exit with status 1 or >1.

When the rules from 1.4 Utility Description Defaults are brought into play, it is apparent that the exit status has to be >1, but it would be better if it was easily seen from just the diff EXIT STATUS section rather than having to follow this chain of reasoning:
1.4 under CONSEQUENCES OF ERRORS says "A diagnostic message shall be written to standard error whenever an error condition occurs."

diff STDERR says "The standard error shall be used only for diagnostic messages."

1.4 under STDERR says "When this section is listed as ``The standard error shall be used only for diagnostic messages.'', it means that, unless otherwise stated, the diagnostic messages shall be sent to the standard error only when the exit status indicates that an error occurred and the utility is used as described by this volume of POSIX.1-2017.

Therefore if an error occurs when writing the differences a diagnostic message has to be written, and because a diagnostic message was written the exit status has to be one that indicates an error occurred (if the utility is used as described...).

Desired Action Change:
Differences were found.
to:
Differences were found and all differences were successfully output.

Tags tc3-2008
Attached Files

- Relationships
related to 0001499Applied Use of "non-zero" in 1.4 under CONSEQUENCES OF ERRORS is not specific enough 
related to 0001500Applied expr EXIT STATUS needs some changes 
related to 0001501Applied find EXIT STATUS needs some changes 
related to 0001502Applied Exit status 0 for the grep utility needs changing 
related to 0001508Applied Exit status 0 for the stty utility needs changing 
related to 0001509Applied tty EXIT STATUS needs some changes 
related to 0001512Applied Exit status 0 for the what utility needs changing 

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2021-08-06 11:14 geoffclare New Issue
2021-08-06 11:14 geoffclare Name => Geoff Clare
2021-08-06 11:14 geoffclare Organization => The Open Group
2021-08-06 11:14 geoffclare Section => diff
2021-08-06 11:14 geoffclare Page Number => 2663
2021-08-06 11:14 geoffclare Line Number => 86756
2021-08-06 11:14 geoffclare Interp Status => ---
2021-08-06 11:17 geoffclare Relationship added related to 0001499
2021-08-06 13:01 geoffclare Relationship added related to 0001500
2021-08-06 14:41 geoffclare Relationship added related to 0001501
2021-08-06 15:11 geoffclare Relationship added related to 0001502
2021-08-10 15:18 geoffclare Relationship added related to 0001508
2021-08-10 15:25 geoffclare Relationship added related to 0001509
2021-08-12 14:16 geoffclare Relationship added related to 0001512
2021-12-02 16:27 Don Cragun Status New => Resolved
2021-12-02 16:27 Don Cragun Resolution Open => Accepted
2021-12-02 16:29 Don Cragun Tag Attached: tc3-2008
2022-01-06 10:37 geoffclare Status Resolved => Applied


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker