On June 16, 2005 at 22:25, "Chad Leigh -- Shire.Net LLC" wrote:
> >> cputime unlimited
> >> filesize unlimited
> >> datasize unlimited
> >> stacksize 8192 kbytes
> >> coredumpsize 0 kbytes
> >> memoryuse unlimited
> >> vmemoryuse unlimited
> >> descriptors 1024
> >> memorylocked unlimited
> >> maxproc 7168
>> The above limit command was done as the same user who is running the
> cgi as is the shell. They are the same user. This apache runs as
> user mailman and I did a "su - mailman" before I ran "limit" to get
> the above numbers.
You cannot absolutely state that the limits are the same, even if
the uid is the same. You either need to examine Apache source and
mod_cgi to see how it deals with limits and invoke CGI programs.
I.e. The shell and Apache are two different environments for
invoking a program, and each environment may invoke programs and
set limits differently.
One test that can be done is to write a C-based CGI program that
just outputs the effective limits (do _not_ invoke a shell callout
to get such information since the shell could modify these limits).
Do a 'man 3 getrlimit' for the C library calls for to use.
--ewh