Question: Write a function in C called ForkExec() that combines the fork() and exec() system calls in linux . The function takes a NULL terminated array
Write a function in C called ForkExec() that combines the fork() and exec() system calls in linux. The function takes a NULL terminated array of strings, creates a process to run the new executable and returns after the child process terminates.
Test your code by the running the following main.c:
int ForkExec(char *temp[]) { .. }
void main(int argc, char *argv[]) {
ForkExec(argv);
return 1;
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
