Question: A Linux thread that executes the following switch statement and takes the -1 case: switch( fork() ){ case -1: exit(0); case 0: execl(./new_prog, new_prog, NULL);

A Linux thread that executes the following switch statement and takes the -1 case:

 switch( fork() ){              case -1:                       exit(0);              case 0:                    execl("./new_prog", "new_prog", NULL);      }

a. creates a child and then terminates itself

b. leaves the switch statement and continues to execute its code

c. cannot create a child and thus terminates itself

d. creates a child process that can never become a zombie

Step by Step Solution

3.37 Rating (147 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The detailed answer for the above question is provided below This code snippet is related to process ... View full answer

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 Operating System Questions!