lkml.org 
[lkml]   [2008]   [Feb]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC/PATCH] RLIMIT_ARG_MAX


On Fri, 29 Feb 2008, Michael Kerrisk wrote:
>
> My reading of POSIX.1 (and POSIX doesn't seem very explicit on this point), is
> that the limits on argv+environ and on stack are decoupled, since POSIX
> specifies RLIMIT_STACK and sysconf(_SC_ARG_MAX) and doesn't specify any
> relationship between the two.

I agree. And clearly there _are_ relationships and always have been, but
equally clearly they simply haven't been a big issue in practice, and
nobody really cares.

Usually, _SC_ARG_MAX is just so much smaller than RLIMIT_STACK that it
makes no possible difference. Which I would actually argue we should just
continue with: just keep _SC_ARG_MAX a smallish, irrelevant constant.

We still have to have the compile-time ARG_MAX constant (as in *real*
constant - a #define) anyway, for traditional programs, and you might as
well make sysconf(_SC_ARG_MAX) always just match ARG_MAX.

It's not like there is likely a single user of _SC_ARG_MAX that cares.

Linus


\
 
 \ /
  Last update: 2008-02-29 21:01    [W:0.250 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site