The following issue has been SUBMITTED. ====================================================================== https://www.austingroupbugs.net/view.php?id=1347 ====================================================================== Reported By: dalias Assigned To: ====================================================================== Project: 1003.1(2016)/Issue7+TC2 Issue ID: 1347 Category: System Interfaces Type: Clarification Requested Severity: Editorial Priority: normal Status: New Name: Rich Felker Organization: musl libc User Reference: Section: stderr Page Number: unknown Line Number: unknown Interp Status: --- Final Accepted Text: ====================================================================== Date Submitted: 2020-05-28 19:50 UTC Last Modified: 2020-05-28 19:50 UTC ====================================================================== Summary: stderr access mode - "is expected to be" is not defined Description: The specification of the standard FILE streams includes the (CX shaded) text:
"The stderr stream is expected to be open for reading and writing." As far as I can tell, the wording "is expected to be" is not defined anywhere in the standard, and is unclear as to which party may use the expectation and which is responsible for ensuring that it is satisfied. In addition, it's unclear whether the intent was that the expectation apply to the underlying open file description behind fd 2, or the stderr stdio FILE stream. The latter does not seem useful since dual-mode streams are only usable on seekable files (there's no way to switch from reading to writing without a successful seek) but the use of the word "stream" in the above-quoted suggests it should be read that way. Moreover, even if the stream is open for reading and writing, that does not automatically imply that the file descriptor is. Desired Action: Clarify which party (implementation, invoking application, or something else) the obligation is on and which party may have the expectation. Clarify what the consequences are if the expectation is not satisfied. Clarify whether the statement applies to the FILE stream, the underlying open file description's mode, or both. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2020-05-28 19:50 dalias New Issue 2020-05-28 19:50 dalias Name => Rich Felker 2020-05-28 19:50 dalias Organization => musl libc 2020-05-28 19:50 dalias Section => stderr 2020-05-28 19:50 dalias Page Number => unknown 2020-05-28 19:50 dalias Line Number => unknown ======================================================================