title: Processes hierarchy
body: <p>I have a question about fork() and exit() to prepare for an exam.
  In the following code, how many processes are generated and what is their hierarchy (parent/child)?</p>
  
  <pre><code>int i;
  pid_t f;
  for(i=0; i&lt;3; i++){
    f = fork();
    if(f==0) exit(0);
    f = fork();
    if(f &gt; 0) exit(0);
  }  
  </code></pre>
  
  <p>I think that the total processes created are equal to 6, but the total processes at the end are equal to 1 and the remaining one is a child, am I right or not?</p>