A NOTE has been added to this issue. ====================================================================== https://austingroupbugs.net/view.php?id=1798 ====================================================================== Reported By: eblake Assigned To: ====================================================================== Project: Issue 8 drafts Issue ID: 1798 Category: System Interfaces Type: Clarification Requested Severity: Objection Priority: normal Status: Resolution Proposed Name: Eric Blake Organization: Red Hat User Reference: ebb.posix_getdents Section: XSH posix_getdents Page Number: 1567 Line Number: 52609 Final Accepted Text: https://austingroupbugs.net/view.php?id=1798#c6721 ====================================================================== Date Submitted: 2024-01-22 15:13 UTC Last Modified: 2024-03-22 09:48 UTC ====================================================================== Summary: Must posix_getdents remember file offsets across exec? ======================================================================
---------------------------------------------------------------------- (0006724) geoffclare (manager) - 2024-03-22 09:48 https://austingroupbugs.net/view.php?id=1798#c6724 ---------------------------------------------------------------------- > If I set up a directory using > > mkdir dir > cd dir > > file1 > ln file1 file2 > > and after that is all done, I run an application (maybe ls) which > uses readdir() to read the directory (with nothing changing in any > way), I assume (hope) that is intended, and required, that readdir() > returns entries for both file1 and file2. If that's not required, > then you can stop reading this note now, and we have bigger problems. Obviously, returning entries for both is _intended_ to be required, but you have uncovered a major problem with the proposed wording, and as it stands implementations would be required to return either file1 or file2 but not both. This is because the text uses "file" when it means "directory entry". In your example, file1 and file2 are separate directory entries which both refer to the same file. If we reword in terms of directory entries, I think no explicit statement about renaming will be needed. If the rename removes one directory entry and adds another, it will be covered by the add/remove text; if it updates the name within the directory entry, the existing requirement for directory operations to be atomic will be sufficient. > I also notice that posix_getdents() says nothing about the effects of > a rename() - and perhaps should. However, were the language changed > to refer to file names being added to or removed from the directory, > rather than files being added or removed, then what is there now would > cover it I think. In the relevant paragraph (lines 52624-52629 in draft 4) the first sentence uses "directory entry" and the second uses "file". The second should change to use "directory entry". Issue History Date Modified Username Field Change ====================================================================== 2024-01-22 15:13 eblake New Issue 2024-01-22 15:13 eblake Name => Eric Blake 2024-01-22 15:13 eblake Organization => Red Hat 2024-01-22 15:13 eblake User Reference => ebb.posix_getdents 2024-01-22 15:13 eblake Section => XSH posix_getdents 2024-01-22 15:13 eblake Page Number => 1567 2024-01-22 15:13 eblake Line Number => 52609 2024-01-22 15:30 eblake Note Added: 0006632 2024-01-22 15:39 eblake Note Edited: 0006632 2024-02-16 10:18 corinna_vinschenNote Added: 0006658 2024-02-29 17:27 geoffclare Note Added: 0006695 2024-02-29 17:29 geoffclare Final Accepted Text => https://austingroupbugs.net/view.php?id=1798#c6695 2024-02-29 17:29 geoffclare Status New => Resolution Proposed 2024-02-29 17:29 geoffclare Resolution Open => Accepted As Marked 2024-02-29 17:30 geoffclare Tag Attached: tc1-2024 2024-03-04 09:38 corinna_vinschenNote Added: 0006703 2024-03-07 12:28 geoffclare Note Added: 0006708 2024-03-07 15:00 corinna_vinschenNote Added: 0006709 2024-03-07 18:14 geoffclare Note Added: 0006710 2024-03-07 20:24 corinna_vinschenNote Added: 0006711 2024-03-07 20:30 corinna_vinschenNote Added: 0006712 2024-03-08 09:00 geoffclare Note Added: 0006715 2024-03-08 11:08 corinna_vinschenNote Added: 0006716 2024-03-21 16:21 eblake Note Added: 0006721 2024-03-21 16:21 eblake Resolution Accepted As Marked => Reopened 2024-03-21 16:24 eblake Note Edited: 0006721 2024-03-21 16:30 eblake Note Edited: 0006721 2024-03-21 16:31 eblake Final Accepted Text https://austingroupbugs.net/view.php?id=1798#c6695 => https://austingroupbugs.net/view.php?id=1798#c6721 2024-03-21 18:58 corinna_vinschenNote Added: 0006722 2024-03-22 03:50 kre Note Added: 0006723 2024-03-22 04:40 kre Note Edited: 0006723 2024-03-22 04:48 kre Note Edited: 0006723 2024-03-22 09:48 geoffclare Note Added: 0006724 ======================================================================
