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 2021-08-06 11:14
Reporter geoffclare View Status public  
Assigned To
Priority normal Resolution Open  
Status New  
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 No tags attached.
Attached Files

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


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