Question: 1. Why is it necessary to implement a change directory 'cd' command in the shell? Could it be implemented by an external program instead? 3.
1. Why is it necessary to implement a change directory 'cd' command in the shell? Could it be implemented by an external program instead?
3. What would happen if this program did not use the fork function, but just used execv directly? (Try it!) Try temporarily changing the code 'pid_from_fork = fork();' to 'pid_from_fork = 0;'
4. Explain what the return value of fork() means and how this program uses it..
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
