Question: Including the original process, how many unique processes are created in the following program segment? You may find it easiest to draw a tree showing
Including the original process, how many unique processes are created in the following program segment? You may find it easiest to draw a tree showing the hierarchy of parent/child processes. (The fork() call returns 0 to the child process.)
pid_t pid; pid = fork(); if (pid == 0) { fork(); } fork(); if (pid == 0) { fork(); }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
