From: Bruno Haible <bruno@clisp.org>
To: Rich Felker <dalias@libc.org>
Cc: musl@lists.openwall.com
Subject: Re: [musl] insufficient checking in posix_spawn_file_actions_add{open,dup2}
Date: Mon, 25 Jan 2021 18:58:30 +0100 [thread overview]
Message-ID: <1697634.l5GBiYWEig@omega> (raw)
In-Reply-To: <20210125161512.GW23432@brightrain.aerifal.cx>
Rich Felker wrote:
> I'm not convinced that the standard as written
> requires any comparison against sysconf(_SC_OPEN_MAX). Is there a
> general rule somewhere that {x_MAX} in the text implies a requirement
> to use the dynamic runtime value if x_MAX is undefined but there's a
> corresponding _SC_x_MAX?
As far as I understand, [1] defines the meaning of {OPEN_MAX}, and [2]
says that {OPEN_MAX} is sysconf(_SC_OPEN_MAX).
Also, [2] says
"sysconf(_SC_OPEN_MAX) may return different values before and after a
call to setrlimit() which changes the RLIMIT_NOFILE soft limit."
Bruno
[1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html
[2] https://pubs.opengroup.org/onlinepubs/9699919799/functions/sysconf.html
next prev parent reply other threads:[~2021-01-25 17:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-25 8:31 Bruno Haible
2021-01-25 8:40 ` [musl] insufficient checking in posix_spawn_file_actions_addclose Bruno Haible
2021-01-25 14:42 ` [musl] insufficient checking in posix_spawn_file_actions_add{open,dup2} Rich Felker
2021-01-25 16:07 ` Bruno Haible
2021-01-25 16:15 ` Rich Felker
2021-01-25 17:58 ` Bruno Haible [this message]
2021-01-25 19:33 ` Alexey Izbyshev
2021-01-25 19:37 ` Markus Wichmann
2021-01-25 19:48 ` Florian Weimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1697634.l5GBiYWEig@omega \
--to=bruno@clisp.org \
--cc=dalias@libc.org \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).