Question: draw three process pid 1. 2. #include #include #include int main() { 5 pid_t pidi, pid2, pid3, pide; printf (Parent of all: 8d ,getpid()); 6.

draw three process pid draw three process pid 1. 2. #include #include #include int main() {

1. 2. #include #include #include int main() { 5 pid_t pidi, pid2, pid3, pide; printf ("Parent of all: 8d ",getpid()); 6. 7. pidi = fork(); 8. 9 if (pidi == 0) { // A child process. Lets say B. printf("Child with id: td and its Parent id: 4d ", getpid().getppido); 10. pid2 = fork(); if(pid2 == 0){ // A child process. Lets say D. a. printf("Child with id: td and its Parent id: \d ", getpid().getppid(); 11. 12 } 13 } 14 15. 16 if (pidi > 0) pid3 = fork(); if(pid3 == 0){ // A child process. Lets say C. printf("Child with id: td and its Parent id: 4d ", getpid().getppido): 18. pid4 = fork(); 19. if (pid4 == 0) { // A child process. Lets say E. 20. printf("Child with id: td and its Parent id: 4d ", getpid().getppid(); 17 21. ) 22. ) 23. 24. for (int i=0; i

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!