Question: CODE IN C! AND SHOW THAT IT WORKS CORRECTLY AS THE PROBLEM STATES!!! 1. Write a program in which the child process waits for parent

CODE IN C! AND SHOW THAT IT WORKS CORRECTLY AS THE PROBLEM STATES!!!

CODE IN C! AND SHOW THAT IT WORKS CORRECTLY AS THE PROBLEM

1. Write a program in which the child process waits for parent process to complete some actions. The detailed actions are as follows (refer the "procexec/fork_sig_sync.c") : 45 points FILE NAME: hw5_1.c - Before fork: a. Use SIGUSR1 and add this signal to the signal mask b. Use "signal)" to call "signal handler)" that prints out "Here is the Signal Handler" - Child process: c. Replace the process signal mask by the empty signal set d. Suspend child process waiting for a signal from the parent e. Prints out "Child received signal" when it receives the signal f. Restore signal mask to the value it had prior to the replacement (step c) g. Exit - Parent process: h. Print out "Parent started..." i. Sleep 3 seconds j. Print out "Parent about to signal child..." k. Send the SIGUSR1 to the child l Exit 1. Write a program in which the child process waits for parent process to complete some actions. The detailed actions are as follows (refer the "procexec/fork_sig_sync.c") : 45 points FILE NAME: hw5_1.c - Before fork: a. Use SIGUSR1 and add this signal to the signal mask b. Use "signal)" to call "signal handler)" that prints out "Here is the Signal Handler" - Child process: c. Replace the process signal mask by the empty signal set d. Suspend child process waiting for a signal from the parent e. Prints out "Child received signal" when it receives the signal f. Restore signal mask to the value it had prior to the replacement (step c) g. Exit - Parent process: h. Print out "Parent started..." i. Sleep 3 seconds j. Print out "Parent about to signal child..." k. Send the SIGUSR1 to the child l Exit

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!