title: How to read the return code from a child process
body: <p>I use fork and execv to execute a child process. In the parent program, I have this:</p>
  
  <pre><code>int status;
  wait(&amp;status);
  cout &lt;&lt; "return code = " &lt;&lt; status &lt;&lt; endl;
  </code></pre>
  
  <p>Will that wait for the child process to terminate and then display it's return code?</p>