The following issue has been SUBMITTED. ====================================================================== https://austingroupbugs.net/view.php?id=1488 ====================================================================== Reported By: geoffclare Assigned To: ====================================================================== Project: 1003.1(2016/18)/Issue7+TC2 Issue ID: 1488 Category: Shell and Utilities Type: Error Severity: Comment Priority: normal Status: New Name: Geoff Clare Organization: The Open Group User Reference: Section: pwd Page Number: 3131 Line Number: 104830 Interp Status: --- Final Accepted Text: ====================================================================== Date Submitted: 2021-07-12 09:31 UTC Last Modified: 2021-07-12 09:31 UTC ====================================================================== Summary: pwd RATIONALE does not account for ENOSPC Description: The part of the pwd RATIONALE that talks about partial output does not take into account the possibility of an ENOSPC condition causing a partial write.
The normative text in CONSEQUENCES OF ERRORS would also benefit from a small change, as the current text can be interpreted as requiring pwd to travel back in time and change what it has already done. Since time travel isn't possible, such an interpretation is obviously incorrect, but it is worth updating the text to stop readers trying to interpret it that way. Desired Action: On page 3131 line 104819 section pwd, change:<blockquote>If an error is detected, output shall not be written to standard output, a diagnostic message shall be written to standard error, and the exit status is not zero.</blockquote>to:<blockquote>If an error is detected other than a write error when writing to standard output, no output shall be written to standard output, a diagnostic message shall be written to standard error, and the exit status shall be non-zero.</blockquote> On page 3131 line 104830 section pwd, change:<blockquote>In most utilities, if an error occurs, partial output may be written to standard output. This does not happen in historical implementations of <i>pwd</i>. Because <i>pwd</i> is frequently used in historical shell scripts without checking the exit status, it is important that the historical behavior is required here; therefore, the CONSEQUENCES OF ERRORS section specifically disallows any partial output being written to standard output.</blockquote>to:<blockquote>In most utilities, if an error occurs, partial output may be written to standard output. This does not happen in historical implementations of <i>pwd</i> (unless an [ENOSPC] condition causes a partial write). Because <i>pwd</i> is frequently used in historical shell scripts without checking the exit status, it is important that the historical behavior is required here; therefore, the CONSEQUENCES OF ERRORS section specifically disallows any partial output being written to standard output, except when a write error occurs when writing to standard output.</blockquote> ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2021-07-12 09:31 geoffclare New Issue 2021-07-12 09:31 geoffclare Name => Geoff Clare 2021-07-12 09:31 geoffclare Organization => The Open Group 2021-07-12 09:31 geoffclare Section => pwd 2021-07-12 09:31 geoffclare Page Number => 3131 2021-07-12 09:31 geoffclare Line Number => 104830 2021-07-12 09:31 geoffclare Interp Status => --- ======================================================================