Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Issue 319703007: Cleanup WaitpidWithTimeout (Closed)

Created:
6 years, 6 months ago by mdempsky
Modified:
6 years, 6 months ago
Reviewers:
brettw
CC:
chromium-reviews, erikwright+watch_chromium.org
Visibility:
Public.

Description

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 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=275983

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -34 lines) Patch
M base/process/kill_posix.cc View 7 chunks +19 lines, -34 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
mdempsky
6 years, 6 months ago (2014-06-06 02:35:39 UTC) #1
brettw
lgtm
6 years, 6 months ago (2014-06-09 16:57:19 UTC) #2
mdempsky
The CQ bit was checked by mdempsky@chromium.org
6 years, 6 months ago (2014-06-09 17:25:12 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mdempsky@chromium.org/319703007/1
6 years, 6 months ago (2014-06-09 17:26:10 UTC) #4
commit-bot: I haz the power
6 years, 6 months ago (2014-06-10 11:09:16 UTC) #5
Message was sent while issue was closed.
Change committed as 275983

Powered by Google App Engine
This is Rietveld 408576698