Re: do shell script - any limit to text argument?
Re: do shell script - any limit to text argument?
- Subject: Re: do shell script - any limit to text argument?
- From: "Robert C. Jacobson" <email@hidden>
- Date: Tue, 8 Apr 2003 09:32:39 -0400
Although I agree that large data should be read from a file, how
about adding a reference to changing kern.argmax via sysctl? i.e:
sysctl -w kern.argmax=65536
IIRC, increasing this has the consequence of increasing the memory
space used by each process. i.e. If you increase kern.argmax by 65KB
to 131072, each process launched from that point on will consume 65KB
more memory than it normally would have.
At 12:37 AM -0700 4/8/03, Christopher Nebel wrote:
Q: How long can my command be, really?
A: Calling do shell script creates a new sh process, and is
therefore subject to the system's normal limits on passing data to
new processes: the arguments (in this case, the text of your command
plus about 40 bytes of overhead) and any environment variables may
not be larger than NCARGS, which is currently 65,536 bytes. Because
do shell script inherits its parent's environment (see the next
question), the exact amount of space available for command text
depends on the calling environment. In practical terms, this comes
out to somewhat more than 65,000 bytes, but unusual environment
settings might reduce that substantially.
--Chris Nebel
Apple Development Tools
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Robert Jacobson email@hidden
BS, Aeronautical Engineering Univ. of Md., College Park
Flight Ops. Team - SOlar Heliospheric Observatory (SOHO)
(301) 286-1591
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.