The following issue has been SUBMITTED. ====================================================================== https://austingroupbugs.net/view.php?id=1385 ====================================================================== Reported By: geoffclare Assigned To: ====================================================================== Project: 1003.1(2016)/Issue7+TC2 Issue ID: 1385 Category: System Interfaces Type: Error Severity: Objection Priority: normal Status: New Name: Geoff Clare Organization: The Open Group User Reference: Section: unlink() Page Number: 2197 Line Number: 70220 Interp Status: --- Final Accepted Text: ====================================================================== Date Submitted: 2020-07-29 10:44 UTC Last Modified: 2020-07-29 10:44 UTC ====================================================================== Summary: unlink() text needs updating to account for mmap() Description: The mmap() description says:<blockquote>The mmap() function shall add an extra reference to the file associated with the file descriptor fildes which is not removed by a subsequent close() on that file descriptor. This reference shall be removed when there are no more mappings to the file.</blockquote>I believe the intention of this is that when unlink() removes the last link to the file, the space it occupies is not freed until no process has the file open <b>and</b> no process has it mapped. However, this is not reflected in the description of unlink(), which only refers to processes having the file open.
Desired Action: Change:<blockquote>When the file's link count becomes 0 and no process has the file open, the space occupied by the file shall be freed and the file shall no longer be accessible. If one or more processes have the file open when the last link is removed, the link shall be removed before <i>unlink</i>() returns, but the removal of the file contents shall be postponed until all references to the file are closed.</blockquote>to:<blockquote>When the file's link count becomes 0 and no process has a reference to the file via an open file descriptor or a memory mapping (see [xref to mmap()]), the space occupied by the file shall be freed and the file shall no longer be accessible. If one or more processes have such a reference to the file when the last link is removed, the link shall be removed before <i>unlink</i>() returns, but the removal of the file contents shall be postponed until there are no such references to the file.</blockquote> ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2020-07-29 10:44 geoffclare New Issue 2020-07-29 10:44 geoffclare Name => Geoff Clare 2020-07-29 10:44 geoffclare Organization => The Open Group 2020-07-29 10:44 geoffclare Section => unlink() 2020-07-29 10:44 geoffclare Page Number => 2197 2020-07-29 10:44 geoffclare Line Number => 70220 2020-07-29 10:44 geoffclare Interp Status => --- ======================================================================
