[PATCH] posix: Handle negative fds in spawn's addfchdir
Collin Funk
collin.funk1@gmail.com
Wed Mar 25 22:11:08 GMT 2026
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