Changes between Initial Version and Version 1 of Ticket #67754


Ignore:
Timestamp:
Jul 17, 2023, 1:34:23 PM (11 months ago)
Author:
kencu (Ken)
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #67754 – Description

    initial v1  
    77This seemed to meet the implementation spec at the time:
    88
    9 ""After a successful call to fdopendir(), fd is used internally by the implementation, and should not otherwise be used by the application."
     9"After a successful call to fdopendir(), fd is used internally by the implementation, and should not otherwise be used by the application."
    1010
    1111but it turns out that some software still uses "fd" after the call to fdopendir. So this software is broken by the fdopendir implementation in macports.
     
    1919https://pubs.opengroup.org/onlinepubs/9699919799/functions/fdopendir.html
    2020
    21 "Upon successful return from fdopendir(), the file descriptor is under the control of the system, and if any attempt is made to close the file descriptor, or to modify the state of the associated description, other than by means of closedir(), readdir(), readdir_r(), rewinddir(), or [XSI] [Option Start] seekdir(), [Option End] the behavior is undefined. Upon calling closedir() the file descriptor shall be closed."
     21"Upon successful return from fdopendir(), the file descriptor is under the control of the system, and if any attempt is made to close the file descriptor, or to modify the state of the associated description, other than by means of closedir(), readdir(), readdir_r(), rewinddir(), or seekdir(), the behavior is undefined. Upon calling closedir() the file descriptor shall be closed."
    2222
    23 So fdopendir and related calls may need to be changed somehow to close the fd later on.
     23So fdopendir may need to be changed to close the fd later, when closedir is called.
    2424