title: how can I get the return value of a program executed by exec?
body: <p>I have this c code:</p>
  
  <pre><code>if(fork()==0){
    execl("/usr/bin/fsck", "fsck", "/dev/c0d0p1s0", NULL);
  }
  </code></pre>
  
  <p>it calls <code>execl</code> to run <code>fsck</code> for checking the filesystem <code>/dev/c0d0p1s0</code>.  </p>
  
  <p>My question is: how can I get the return value of <code>fsck</code>?</p>
  
  <p>I need the return value of <code>fsck</code> to check whether the file system is consistence or not.</p>
  
  <p>Thank you.</p>