Chromium Code Reviews| Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/wptserve.py |
| diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/wptserve.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/wptserve.py |
| index 6040f80b90d0d07ad105cb142032e7149e56c4e2..87e605a3f53808129928fef0631e2c88b899bf9f 100644 |
| --- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/wptserve.py |
| +++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/wptserve.py |
| @@ -60,17 +60,20 @@ class WPTServe(server_base.ServerBase): |
| % (expiration_date.strftime('%b %d %Y'), path_to_wpt_support)) |
| def _stop_running_server(self): |
| + while self._pid and self._executive.check_running_pid(self._pid): |
| + # TODO(burnik): Figure out a cleaner way of stopping wptserve. |
| + if self._platform.is_win(): |
| + self._executive.kill_process(self._pid) |
| + else: |
| + self._executive.interrupt(self._pid) |
| + |
| + # According to Popen.wait(), this can deadlock when using stdout=PIPE and/or stderr=PIPE. |
| + # We're using DEVNULL for both so that should not occur. |
| + if self._process is not None: |
| + self._process.wait() |
| + |
| # Clean up the pid file. |
| - if self._pid and not self._executive.check_running_pid(self._pid): |
| + if self._filesystem.exists(self._pid_file): |
| self._filesystem.remove(self._pid_file) |
| - return |
| - |
| - # TODO(burnik): Figure out a cleaner way of stopping wptserve. |
| - if self._platform.is_win(): |
| - self._executive.kill_process(self._pid) |
| - else: |
| - self._executive.interrupt(self._pid) |
| - # According to Popen.wait(), this can deadlock when using stdout=PIPE and/or stderr=PIPE. |
| - # We're using DEVNULL for both so that should not occur. |
| - self._process.wait() |
| + return |
|
qyearsley
2016/11/17 01:46:40
No need for explicit return here
|