title: Why Would WIFEXITED Return True on Running Process?
body: <p>When I wait on a specific running process group that is a child process, WIFEXITED returns true saying the process exited?  Is this the way it works? Seems there is something I am not understanding....</p>
  
  <pre><code>if ( waitpid(-pgid, &amp;pstatus, WUNTRACED|WNOHANG ) == -1)
      perror("Wait error");
  
  if ( WIFEXITED(pstatus) ) {
      strncpy(buf,  "Exited", buf_size);
      return 0;
  </code></pre>