title: Checking the status of a child process in C++
body: <p>I have a program that uses <code>fork()</code> to create a child process.  I have seen various examples that use <code>wait()</code> to wait for the child process to end before closing, but I am wondering what I can do to simply check if the file process is still running.</p>
  
  <p>I basically have an infinite loop and I want to do something like:</p>
  
  <p><code>if(child process has ended) break;</code></p>
  
  <p>How could I go about doing this?</p>