title: Does control return after "execvp()"?
body: <pre><code>
  if(pid == 0)
  {
        execvp(cmd, args);
        // printf("hello"); // apparently, putting this or not does not work.
        _exit(-1);
  }
  else
  {
        // parent process work
  }
  </code></pre>
  
  <p>"execvp()" replaces the current program with the to-be-execed program (of course in the same process context). So, putting, say, any printf() calls after execvp() won't work. That is what the docs say, and I have verified it as well.</p>
  
  <p>But then, why is _exit() needed..? Does it so happen that the control DOES return to statements post execvp() ?</p>
  
  <p>I will be grateful for any pointers.</p>
  
  <p>Thanks</p>