Question: #include #include #include void parent () { /* (15 points) This function is called by the parent process. It should do the following: 1. Display
#include
void parent () { /* (15 points) This function is called by the parent process. It should do the following: 1. Display a message to the terminal identifying the process as parent 2. Make the parent wait for the child to finish running 3. Display a message to the terminal when the child has finished running See assignment's Expected Output for details on how messages should look. */
}
void child () { /* (5 points) This function is called by the child process. It should display a message to the terminal identifying the process as the child. See assignment's Expected Output for details on how message should look. */
}
int main () { /* (20 points) The main function should accomplish the following: 1. Use fork system call to create a new child process 2. Have the parent process call the parent function 3. Have the child process call the child function 4. Before returning from the function, display a message to the terminal announcing that the process is done. See assignment's Expected Output for details on how message should look. */ return 0; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
