The following issue has been SUBMITTED. 
====================================================================== 
https://austingroupbugs.net/view.php?id=1882 
====================================================================== 
Reported By:                geoffclare
Assigned To:                
====================================================================== 
Project:                    1003.1(2024)/Issue8
Issue ID:                   1882
Category:                   System Interfaces
Type:                       Error
Severity:                   Comment
Priority:                   normal
Status:                     New
Name:                       Geoff Clare 
Organization:               The Open Group 
User Reference:              
Section:                    read() 
Page Number:                1853 
Line Number:                61099 
Interp Status:              --- 
Final Accepted Text:         
====================================================================== 
Date Submitted:             2024-12-03 16:36 UTC
Last Modified:              2024-12-03 16:36 UTC
====================================================================== 
Summary:                    read() EISDIR mentions readdir() but not
posix_getdents()
Description: 
The read() EISDIR error says "The readdir() function should be used
instead".  Now that posix_getdents() has been added, it should be mentioned
too.  In fact, it should probably be mentioned first, as it takes an fd
like read() does, whereas to use readdir() would require obtaining a
directory stream using fdopendir().

Also, the EISDIR error is shaded XSI but I can't see any reason why that
should be so.  Presumably it ended up that way in the 2001 merge because
the error was in SUSv2 but not in POSIX.1-1996, but it includes the
condition "and the implementation does not allow the directory to be read",
so I think the XSI shading was unnecessary back then.

Desired Action: 
Change:<blockquote>The <i>fildes</i> argument refers to a directory and the
implementation does not allow the directory to be read using <i>read</i>()
or <i>pread</i>(). The <i>readdir</i>() function should be used
instead.</blockquote>to:<blockquote>The <i>fildes</i> argument refers to a
directory and the implementation does not allow the directory to be read
using <i>read</i>() or <i>pread</i>(). The <i>posix_getdents</i>() function
should be used instead, or <i>fdopendir</i>() followed by
<i>readdir</i>().</blockquote>
and remove the XSI shading from the entire [EISDIR] error text.

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2024-12-03 16:36 geoffclare     New Issue                                    
2024-12-03 16:36 geoffclare     Name                      => Geoff Clare     
2024-12-03 16:36 geoffclare     Organization              => The Open Group  
2024-12-03 16:36 geoffclare     Section                   => read()          
2024-12-03 16:36 geoffclare     Page Number               => 1853            
2024-12-03 16:36 geoffclare     Line Number               => 61099           
2024-12-03 16:36 geoffclare     Interp Status             => ---             
======================================================================


  • [1003.1(20... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group

Reply via email to