Guest_imported
New member
- Jan 1, 1970
- 0
What is the proper syntax for creating a new process in the following C program:
char* file_name;
file_name = argv[1];
if (fork==0)
execv (file_name, &argv[1] ?? )
This C program is called myprocess and the syntax is as follows:
myprocess (program_to_execute) [arg1, arg2...argn]
(i.e. "myprocess" should pass the argument list that is given to it to the "program_to_execute" in the execv call so that the "program_to_execute" uses them. This list of arguments must be of arbitrary length.
char* file_name;
file_name = argv[1];
if (fork==0)
execv (file_name, &argv[1] ?? )
This C program is called myprocess and the syntax is as follows:
myprocess (program_to_execute) [arg1, arg2...argn]
(i.e. "myprocess" should pass the argument list that is given to it to the "program_to_execute" in the execv call so that the "program_to_execute" uses them. This list of arguments must be of arbitrary length.