title: How many processes are created in this program?
body: <p>I need to know how many processes this creates. Would i be right in thinking that this program would create 6 processes?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;unistd.h&gt;
  int main() {
  
      /* fork a child process */
      pid_t pid = fork();
  
      if (pid &lt; 0) {
          fprintf(stderr, “Fork failed”);
          exit(-1);
      } else if (pid != 0) {
          /* fork another child process */
          fork();
      }
  
      /* fork another child process */
      fork();
      return 0;
  }
  </code></pre>