View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001977 | 1003.1(2024)/Issue8 | System Interfaces | public | 2026-03-26 05:23 | 2026-03-26 05:23 |
| Reporter | collinfunk | Assigned To | |||
| Priority | normal | Severity | Objection | Type | Error |
| Status | New | Resolution | Open | ||
| Name | Collin Funk | ||||
| Organization | GNU | ||||
| User Reference | |||||
| Section | posix_spawn_file_actions_addclose, posix_spawn_file_actions_adddup2 | ||||
| Page Number | 1592-1596 | ||||
| Line Number | 53537-3542, 53659-53661 | ||||
| Interp Status | |||||
| Final Accepted Text | |||||
| Summary | 0001977: posix_spawn_file_actions_addopen and posix_spawn_file_actions_adddup2 contridiction with respect to OPEN_MAX. | ||||
| Description | The ERRORS section for posix_spawn_file_actions_addopen states that it should fail with errno set to EBADF if "The value specified by fildes is negative or greater than or equal to {OPEN_MAX}." It then goes on to state that "It shall not be considered an error for the fildes argument passed to these functions to specify a file descriptor for which the specified operation could not be performed at the time of the call. Any such error shall be detected when the associated file actions object is later used during a posix_spawn() or posix_spawnp() operation." The same text is used for posix_spawn_file_actions_adddup2. On systems where the open file descriptor limit can be changed and OPEN_MAX returns the limit given by RLIMIT_NOFILE, this text is contradictory. The first quoted text suggests that increasing RLIMIT_NOFILE after posix_spawn_file_actions_addopen, but before posix_spawn, is not allowed. The second quoted text suggests that it is allowed. The description of https://austingroupbugs.net/view.php?id=418 only mentions the second quoted text for posix_spawn_file_actions_addclose. However, at some point it seems to have changed to "these functions". Therefore, I think it was probably the intention to make this change. | ||||
| Desired Action | Remove: The posix_spawn_file_actions_addopen() function shall fail if: [EBADF] The value specified by fildes is negative or greater than or equal to {OPEN_MAX}. The posix_spawn_file_actions_addclose() function shall fail if: [EBADF] The value specified by fildes is negative. Change: These functions shall fail if: To: These functions shall fail if: [EBADF] The value specified by fildes is negative. Change: The posix_spawn_file_actions_adddup2() function shall fail if: [EBADF] The value specified by fildes or newfildes is negative or greater than or equal to {OPEN_MAX}. To: The posix_spawn_file_actions_adddup2() function shall fail if: [EBADF] The value specified by fildes is negative. | ||||
| Tags | No tags attached. | ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-03-26 05:23 | collinfunk | New Issue |