A NOTE has been added to this issue. ====================================================================== https://austingroupbugs.net/view.php?id=1855 ====================================================================== Reported By: jsm28 Assigned To: ====================================================================== Project: 1003.1(2024)/Issue8 Issue ID: 1855 Category: System Interfaces Type: Clarification Requested Severity: Comment Priority: normal Status: Interpretation Required Name: Joseph Myers Organization: User Reference: Section: freopen Page Number: 1030-1034 Line Number: 35272-35445 Interp Status: Proposed Final Accepted Text: https://austingroupbugs.net/view.php?id=1855#c6893 ====================================================================== Date Submitted: 2024-09-05 21:36 UTC Last Modified: 2024-10-10 16:00 UTC ====================================================================== Summary: Use of freopen with different kinds of streams ======================================================================
---------------------------------------------------------------------- (0006909) gbrandenrobinson (reporter) - 2024-10-10 16:00 https://austingroupbugs.net/view.php?id=1855#c6909 ---------------------------------------------------------------------- Re: note 6893: Speaking as a lay person only glancingly familiar with standardese: "Regarding the use of freopen() with a null pathname on a stream that has an associated file descriptor, the standard clearly states that the file descriptor associated with the stream need not be closed if the call to freopen() succeeds and that it is implementation-defined which changes of mode are permitted (if any), and under what circumstances, and conforming implementations must conform to this." I find that paragraph hard to interpret. I infer two stipulations: 1. the file descriptor associated with the stream NEED NOT be closed if freopen() succeeds; and 2. changes of mode under such a circumstance are completely at the discretion of the implementation. When I try to deduce what behavior "must be" conformed with thus, I am at a loss. You can close the descriptor, or not, and you will be conformant. You can change some, none, or any file modes, and you will be conformant. It seems like there is no requirement to conform to here. Can someone illuminate the matter? Issue History Date Modified Username Field Change ====================================================================== 2024-09-05 21:36 jsm28 New Issue 2024-09-05 21:36 jsm28 Name => Joseph Myers 2024-09-05 21:36 jsm28 Section => freopen 2024-09-05 21:36 jsm28 Page Number => 1030-1034 2024-09-05 21:36 jsm28 Line Number => 35272-35445 2024-09-06 20:41 Florian Weimer Issue Monitored: Florian Weimer 2024-09-26 16:12 geoffclare Note Added: 0006893 2024-09-26 16:14 geoffclare Interp Status => Pending 2024-09-26 16:14 geoffclare Final Accepted Text => https://austingroupbugs.net/view.php?id=1855#c6893 2024-09-26 16:14 geoffclare Status New => Interpretation Required 2024-09-26 16:14 geoffclare Resolution Open => Accepted As Marked 2024-09-26 16:14 geoffclare Tag Attached: tc1-2024 2024-09-27 08:43 agadmin Interp Status Pending => Proposed 2024-09-27 08:43 agadmin Note Added: 0006894 2024-10-10 16:00 gbrandenrobinsonNote Added: 0006909 ======================================================================
