[PATCH] posix: Handle negative fds in spawn's addfchdir
Lucas
lucas.chollet@free.fr
Thu Mar 26 08:49:47 GMT 2026
If you want to open a Austin Group bug report, for completeness,
posix_spawn_file_actions_adddup2 also has the OPEN_MAX text[1].
[1]
https://pubs.opengroup.org/onlinepubs/9799919799/functions/posix_spawn_file_actions_adddup2.html
On 3/25/26 23:11, Collin Funk wrote:
> Andreas Schwab <schwab@linux-m68k.org> writes:
>
>> On Mär 25 2026, Adhemerval Zanella Netto wrote:
>>
>>> However, the POSIX requirements seems conflicting. It states that
>>>
>>> [EBADF]
>>> The value specified by fildes is negative or greater than or equal to {OPEN_MAX}.
>> https://pubs.opengroup.org/onlinepubs/9799919799/functions/posix_spawn_file_actions_addfchdir.html
>> does not say anything about OPEN_MAX.
> I think Adhemerval was referring to posix_spawn_file_actions_addclose
> which does have the OPEN_MAX text [1].
>
> Collin
>
> [1] https://pubs.opengroup.org/onlinepubs/9799919799/functions/posix_spawn_file_actions_addclose.html
More information about the Libc-alpha
mailing list