Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is the maximum number of commdna line arguments

Status
Not open for further replies.

mythologyrocks

Programmer
Nov 19, 2003
10
GB
Hi all,

Can any 1 here tell me whats the maximum # of command line arguments a C++ program can have in a multiprocessing environment, i.e. we keep creating child processes based on argc in main(int argc, char **argv)..., before v hit stack overflow error...

Thankx in advance.
 
It isn't dependent on the number of arguments: it is the total length of the combined arguments. On Solaris 2.6 it was around 1K.

I resorted to dumping the arguments in a file and passing that file as an argument and all the stack overflows just disappeared.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top