Max number of environment variables in Csh

Anyone knows what is the max limit of number of environment variables in Csh? I have a script that when run causes the shell to stop responding to any command like:

ls
/bin/ls: Argument list too long.

And I guess the reason is I passed the max limit for number of environment variables defined through the script run. Thanks in advance for help.

your shell forks a subshell and this subshell invokes execve(/bin/ls,argv...,envp...) and your args have to within ARG_MAX range..

getconf  ARG_MAX
131072

if your arguments wants the larger buffer than ARG_MAX then ls fails..
and generate this error message..
its define in `/usr/src/kernels/2.6....../include/asm-generic/errno-base.h` and execve uses this

#define E2BIG            7      /* Argument list too long */
 

you maybe can try xargs to pratical or split the files in proper directorys

find /home/cshuser/ -print0| xargs ls -l

regards
ygemici