View Issue Details

IDProjectCategoryView StatusLast Update
00014881003.1(2016/18)/Issue7+TC2Shell and Utilitiespublic2024-06-11 09:07
Reportergeoffclare Assigned To 
PrioritynormalSeverityCommentTypeError
Status ClosedResolutionAccepted As Marked 
NameGeoff Clare
OrganizationThe Open Group
User Reference
Sectionpwd
Page Number3131
Line Number104830
Interp Status---
Final Accepted TextSee 0001488:0005538.
Summary0001488: pwd RATIONALE does not account for ENOSPC
DescriptionThe 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 ActionOn 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.

Tagstc3-2008

Activities

geoffclare

2021-11-25 14:45

manager   bugnote:0005537

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.

geoffclare

2021-11-25 14:47

manager   bugnote:0005538

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 0001488: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