Axel Luttgens:
>
> --- src/util/open_limit.c.original 1998-12-11 19:55:29.000000000
> +0100
> +++ src/util/open_limit.c 2013-03-22 08:56:07.000000000 +0100
> @@ -62,7 +62,8 @@
> #ifdef RLIMIT_NOFILE
> if (getrlimit(RLIMIT_NOFILE, &rl) < 0)
> return (-1);
> - if (limit > 0) {
> + /* Don't update the limit when it is not enforced. */
> + if (limit > 0 && rl.rlim_max != RLIM_INFINITY) {
> if (limit > rl.rlim_max)
> rl.rlim_cur = rl.rlim_max;
> else
>
> This indeed allows a successful launch of master, qmgr...
>
> But this leaves us with a rather low soft limit (rlim_cur) of 256
> descriptors by default in the case of Mac OS X. Doesn't this come
> with potential problems?
You are mistaken. First, since rlim_max==RLIM_INFINITY the limit is
not enforced (unless Apple totally screwed up the setrlimit() API).
Second, rlim_cur was 256 because YOUR patch changed it. Third, you
could test your concern by setting a really low rlim_cur and seeing
if it is enforced while rlim_max==RLIM_INFINITY.
Wietse