title: System call fork() and execv function
body: <p>I'm trying to run two executables consecutively using this c code: </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;unistd.h&gt;
  
  int main (int argc, char *argv[])
  {
      fork();
      execv("./prcs1", &amp;argv[1]); // GIVE ADDRESS OF 2nd element as starting point to skip source.txt
      fork();
      execv("./prcs2", argv);
      printf("EXECV Failed\n");
  }
  </code></pre>
  
  <p>The program exits after the first execv() call despite the fork, it never gets to the second execv(). I've tried calling wait() after the first fork but I'm not sure that's what it's missing. </p>
  
  <p>Any ideas why control doesn't return to the parent after the child exits?</p>