title: WEXITSTATUS(childStatus) returns 0 but waitpid returns -1
body: <p>As far as I know if waitpid returns -1 then it is error condition. How it possible to get success (EXIT_SUCCUSS) from child process in WEXITSTATUS(childStatus)?</p>
  
  <p>What is the difference between childStatus in waitpid &amp; return value from WEXITSTATUS(childStatus)? Does it same? </p>
  
  <pre><code>pid_t returnValue = waitpid(Checksum_pid, &amp;childStatus, WNOHANG);
  printf("return value = %d", returnValue);
  printf("return value = %d", childStatus);
  
  if (WIFEXITED(childStatus))
          {
              printf("Exit Code: _ WEXITSTATUS(childStatus)") ;    
              //Proceed with other calculation.  
          }
  </code></pre>