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
0001488 [1003.1(2016/18)/Issue7+TC2] Shell and Utilities Comment Error 2021-07-12 09:31 2024-06-11 09:07
Reporter geoffclare View Status public  
Assigned To
Priority normal Resolution Accepted As Marked  
Status Closed  
Name Geoff Clare
Organization The Open Group
User Reference
Section pwd
Page Number 3131
Line Number 104830
Interp Status ---
Final Accepted Text See Note: 0005538.
Summary 0001488: 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:
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.
to:
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.

On page 3131 line 104830 section pwd, change:
In most utilities, if an error occurs, partial output may be written to standard output. This does not happen in historical implementations of pwd. Because pwd 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.
to:
In most utilities, if an error occurs, partial output may be written to standard output. This does not happen in historical implementations of pwd (unless an [ENOSPC] condition causes a partial write). Because pwd 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.

Tags tc3-2008
Attached Files

- Relationships

-  Notes
(0005537)
geoffclare (manager)
2021-11-25 14:45

Reopening, as it was pointed out on the mailing list that the text should not single out ENOSPC; there are other error conditions that can cause a partial write. New proposed text will follow.
(0005538)
geoffclare (manager)
2021-11-25 14:47

On page 3131 line 104819 section pwd, change:
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.
to:
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.

On page 3131 line 104830 section pwd, change:
In most utilities, if an error occurs, partial output may be written to standard output. This does not happen in historical implementations of pwd. Because pwd 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.
to:
In most utilities, if an error occurs, partial output may be written to standard output. This does not happen in historical implementations of pwd (unless an error condition causes a partial write). Because pwd 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.

- 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 => ---
2021-11-18 17:16 Don Cragun Status New => Resolved
2021-11-18 17:16 Don Cragun Resolution Open => Accepted
2021-11-18 17:17 Don Cragun Tag Attached: tc3-2008
2021-11-25 14:45 geoffclare Note Added: 0005537
2021-11-25 14:45 geoffclare Status Resolved => Under Review
2021-11-25 14:45 geoffclare Resolution Accepted => Reopened
2021-11-25 14:47 geoffclare Note Added: 0005538
2021-12-02 16:04 Don Cragun Final Accepted Text => See Note: 0005538.
2021-12-02 16:04 Don Cragun Status Under Review => Resolved
2021-12-02 16:04 Don Cragun Resolution Reopened => Accepted As Marked
2022-01-06 10:29 geoffclare Status Resolved => Applied
2024-06-11 09:07 agadmin Status Applied => Closed


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