title: The waitpid() parameters
body: <p>I have a question about the waitpid parameters.
  I'm supposed to start p[1] (process 1) when p[0] is done.</p>
  
  <p>This is what starts p0:</p>
  
  <pre><code>if(p[0] == 0){
      process(0,1); //(process, duration(time))
      return 0;
  }
  </code></pre>
  
  <p>Now I want p1 to start as soon as p0 ends (after 1 sec)</p>
  
  <pre><code>if(p[1] == 0){
      process(1,2);
      return 0;
  }
  waitpid(p[0], NULL, 0);
  </code></pre>
  
  <p>Here's my question: what do the parameters in waitpid mean? should the last parameter be set to 1, since p[0] ends after 1 sec and this is when I want p[1] to start?</p>