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-05-14 15:40 |
| Reporter | collinfunk | Assigned To | |||
| Priority | normal | Severity | Objection | Type | Error |
| Status | Interpretation Required | Resolution | Accepted As Marked | ||
| 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 | tc1-2024 | ||||
|
|
Interpretation response: ------------------------ The standard states that these functions must fail if the argument exceeds OPEN_MAX, and conforming implementations must conform to this. However, concerns have been raised about this which are being referred to the sponsor. Rationale: ---------- See Description. Notes to the Editor (not part of this interpretation): ------------------------------------------------------ On pages 1592-1593, change the ERRORS clause, lines 53537-53549 to:
On page 1596, section posix_spawn_file_actions_adddup2 ERRORS, at line 53660-53661, delete
After line 53663 add
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-03-26 05:23 | collinfunk | New Issue | |
| 2026-05-14 15:12 | nick | Relationship added | related to 0000418 |
| 2026-05-14 15:38 | nick | Status | New => Interpretation Required |
| 2026-05-14 15:38 | nick | Resolution | Open => Accepted As Marked |
| 2026-05-14 15:38 | nick | Interp Status | => --- |
| 2026-05-14 15:38 | nick | Note Added: 0007427 | |
| 2026-05-14 15:39 | nick | Note Edited: 0007427 | |
| 2026-05-14 15:40 | nick | Tag Attached: tc1-2024 |