Cleanup WaitpidWithTimeout
This CL gives WaitpidWithTimeout() an API more similar to waitpid(); i.e., it returns the success state via the return value, and the process's termination status via an out-parameter. It also avoids assuming that "status == -1" is an invalid status code, as POSIX makes no guarantees about the representation of status values. Lastly (and my original motivation), the code now avoids unnecessarily relying on non-portable waitpid() behavior. POSIX arguably requires waitpid() to *not* modify the status value if it returns 0, but at least OpenBSD still modifies status in this case, which then triggers a DCHECK failure in base_unittests. TEST="base_unittests --gtest_filter=ProcessUtilTest.DelayedTermination" on OpenBSD Review URL: https://codereview.chromium.org/319703007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275983 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment