title: How to run child processes concurrently
body: <p>I want child processes run concurrently. Is it OK to write as to achieve this:</p>
  
  <pre><code> for(p = 0; p &lt; N; p++){ //there will be N child processes
      pidOfChild = fork();
      if(pidOfChild == -1){
        printf("fork() failed.\n");
        exit(1);
      }
      else if(pidOfChild == 0){
        //do sth
        printf("I am a child and my PID is %d.\n", getpid());
        exit(0);
      }
    }
  </code></pre>