Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 25 Jan 2021 18:58:30 +0100
From: Bruno Haible <>
To: Rich Felker <>
Subject: Re: insufficient checking in posix_spawn_file_actions_add{open,dup2}

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."



Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.