Question: The Following program fork() a child process.Then the child process outputs the parent process ID,delivers signal SIGKILL the the parent process and after that ,

The Following program fork() a child process.Then the child process outputs the parent process ID,delivers signal SIGKILL the the parent process and after that , the child process outputs its parent process ID again. Some statements or parts of the statements are missing in the program. Please add necessary (parts of)statements to complete it (25 pts).*/

#include #include #include #include int main (void) { int i=0; pid_t Pid,Parent_Pid; switch (Pid=fork()) { case -1: perror("The fork failed"); break; case 0: Parent_Pid=

/////missing here fill it statement

exit(1); default: for(i=0;;++i) { printf("%d ",i); } break; } return 0; }

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!