Catch exit code of external program in c++
<p>I am running an external program with the command <code>execvp</code>, now I want to catch the exit code of the external program and if possible get the <code>PID</code> of it.</p>

<p>Is there anyway possible?(I know I can read <code>$?</code> in ubuntu and use <code>ps faxu</code> but these are dirty ways for that)</p>
