How many bytes can be sent as a command line argument when spawning a process on Linux?
gahooa offers a good article at http://www.in-ulm.de/~mascheck/various/argmax/ , but if this page disappears someday, here's the deal: find the Maximum length of command line arguments trying to do one of the following
* command: getconf ARG_MAX * system call: sysconf(_SC_ARG_MAX) * system header: ARG_MAX in eg <[sys/]limits.h>
A good article describes the problem:
http://www.in-ulm.de/~mascheck/various/argmax/
This snippet will tell you.
#include <stdio.h> #include <unistd.h> int main(int argc, char** argv) { const long value = sysconf(_SC_ARG_MAX); printf("ARG_MAX: %ld\n", value); }