I wonder if there are some API to get the current process\' command line arguments on Linux.
I guess I was terribly unclear. The real purpose of the question was a
checkout Getopt It's a command line parsing library that's implemented in many languages including C.
Otherwise:
int main(int argc, char *argv[])
argv is an array of arguments as char* and argc is the number of arguments.
argv
char*
argc
argv[0] is always the executable filename itself.
argv[0]