Have some code like this:
unsigned pid = waitpid(mPid, &status, WNOHANG);
mExitStatus = WEXITSTATUS(status);
Get the debug print for the variable like:
mExitStatus = 15
status = 3840
For "mExitStatus = WEXITSTATUS(status)", I got following statment which explains
evaluates to the least significant eight bits of the return code of the child which terminated
3840 = F00; F is 15 which is assigned to mExitStatus
But question is how I can use this 15 to judge whether if the child process is terminated correctly or not?
15 is from 3840. But 3840 is return by linux process? Any meaning for that?
In a general description, my main started 4 child_process running 4 tests. I would like to judge in my main if those 4 tests are passed or not. So I think I need to jude on the exit status of my child process.
Thanks