title: Getting the exit code of a finished process whose pid is known
body: <p>There is a <a href="http://pubs.vmware.com/vsphere-50/index.jsp#com.vmware.wssdk.apiref.doc_50/vim.vm.guest.ProcessManager.ProcessInfo.html" rel="nofollow">vmware api</a> which can return the pid and exit code of executed processes. Some how I am getting only the pid but not the exit code(may be due to unsupported guest os). </p>
  
  <p>Generally it returns the out put like this :</p>
  
  <pre><code>   name = 'chmod',
     pid = 2377,
     owner = 'reuben',
     cmdLine = '"/bin/chmod" +x /home/reuben/some_script.sh',
     startTime = 2014-10-14T07:31:07Z,
     endTime = &lt;unset&gt;,
     exitCode = &lt;unset&gt;
  </code></pre>
  
  <p>As you can see I am not getting the exit code. But it works with other supported guest OS. </p>
  
  <p><strong>Note</strong>: though it is not returning the exit code but the process is finishing successfully. </p>
  
  <p>So is there any unix command to know the exit code from the pid ? </p>