title: How do I end a child process after it is finished doing stuff?
body: <p>Here is the code I'm using to create the n number of children and increment count:</p>
  
  <pre><code>int pid;
  for(j = 1; j&lt;=numForks; j++){
      if((pid=fork()) == 0){  /*child process*/
          count++;
      }else{ /*parent process*/
  
      }
  }
  </code></pre>
  
  <p>I'm not sure how to exit out of each child. And I'm not allowed to use any sort of wait function.</p>