Question: The following picture is step (handle from tutorial 9) C programming language 2. Write a program in t10-fork.c which creates a new process in main
The following picture is step (handle from tutorial 9)
C programming language
2. Write a program in t10-fork.c which creates a new process in main using the fork system call. Using the return value from fork , print out whether the process is the child or the parent. 3. Add signal handlers to only the child process so that it prints to stdout when it receives SIGUSR1, SIGUSR2, or SIGINT. The child should then wait until receiving SIGINT before terminating. Hint: the child's code should look very similar to the code for handle from Tutorial 9. 4. Add code for (only) the parent process so that it prompts the user to choose which signal to send to the child, then send it. The process should terminate once it has sent a SIGINT to the child process. 1 #incLude
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
