Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: export limit in zsh and other shells?



On Jun 2,  7:49pm, Nik Gervae wrote:
} Subject: export limit in zsh and other shells?
}
} Here at PDI we use a TON of environment variables to control many aspects of
} our animation jobs. Just today a user came to me complaining that when he
} loaded *all* of these variables into his zsh session he got output like
} this:
} 
}   % ls
}   zsh: arg list too long: ls

On Jun 3,  3:43am, Geoff Wing wrote:
} Subject: Re: export limit in zsh and other shells?
}
} And all the shells spew out the same message.  It's an operating system
} limit on argument lists.
} 
} 	% sysctl kern.argmax
} 	kern.argmax = 262144
} which is described as "The maximum bytes of argument to execve(2)."

The important point to note here is that "argument to execve(2)" includes
both the `argv' and `envp' arrays.  Although passed to execve() as two
pointers (char*[]), when the kernel prepares a new process image for
execution it copies the entirety of both arrays into a contiguous chunk
of memory.  The `argmax' kernel parameter in Geoff's example sets the
size of that chunk.

In short, you may have to find a different way to control your animations.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



Messages sorted by: Reverse Date, Date, Thread, Author