Question: Compute this in C 1. Write a program in which the child process waits for parent process to complete some actions. The detailed actions are
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" which has reverse roles):40 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. Suspend child process waiting for a signal from the parent d. Prints out "Child received a signal" e. Restore signal mask from the backup list f. Exit -Parent process g. Print out "Parent started... h. Sleep 3 seconds i. Print out "Parent about to signal child..." j. Send the SIGUSR1 to the child k. Exit
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
