Question: (e) The following code uses fork0, wait) and exec) functions. Explain, using an example what the code does at the places indicated. argv contains the

(e) The following code uses fork0, wait) and exec) functions. Explain, using an example what the code does at the places indicated. argv contains the values cp file1 and file2 where cp is the linux copy function. (8 marks) void function1 (char "argv) pidt pida pid data type int status if ((pid forkO) 0) "what happens here "/ prERROR: forking child process failedin"), exit(42), else if (pid0) if (execvp(argv, argv)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
