Speeding up 'maximum length of command line' check

Michael Nottebrock michaelnottebrock at gmx.net
Sat Nov 27 15:30:57 GMT 2004


Adriaan de Groot wrote:

> On Saturday 27 November 2004 12:23, Dirk Mueller wrote:

>>It defeats the purpose of the check. Its not there to test the kernel
>>limits of the command line, but of the user space limits.
> 
> 
> I don't quite follow here: kern.argmax is
>      KERN_ARGMAX
>              The maximum bytes of argument to execve(2).

Yeah, there are no "user space limits" for this kind of thing.

> And in fact every package build on FreeBSD sets 
>     lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
> in the environment _before running configure_, so for package builds this 
> whole test is moot _anyway_. It's really about saving the folks who build 
> from CVS some time; I suppose I can always copy the package build scheme and 
> set this extra environment variable.

That's probably best. The libtool guys chose this generic (and very 
suboptimal) way of determining ARG_MAX for portability purposes, that 
modification to libtool seems like unnecessary delta to upstream libtool.

However, every KDE developer should probably be setting lt_cv_sys_max_cmd_len 
before running configure in one way or the other, on Linux you'd probably use 
getconf to get the value. Using the default check is just a waste of time. :)

-- 
    ,_,   | Michael Nottebrock               | lofi at freebsd.org
  (/^ ^\) | FreeBSD - The Power to Serve     | http://www.freebsd.org
    \u/   | K Desktop Environment on FreeBSD | http://freebsd.kde.org




More information about the kde-core-devel mailing list