Commit b4609728 authored by Robert Ma's avatar Robert Ma Committed by Commit Bot

[blinkpy] Log errors when trying to kill non-existent processes

More logging in hope of shedding some light on issue 929413
(content_shell outliving run_web_tests).

Bug: 929413
Change-Id: I47117a85a083158d13527a535dab312774220001
Reviewed-on: https://chromium-review.googlesource.com/c/1474630Reviewed-by: default avatarQuinten Yearsley <qyearsley@chromium.org>
Commit-Queue: Robert Ma <robertma@chromium.org>
Cr-Commit-Position: refs/heads/master@{#632388}
parent 0f7e7db0
......@@ -134,7 +134,7 @@ class Executive(object):
command = ['taskkill.exe', '/f', '/t', '/pid', pid]
# taskkill will exit 128 if the process is not found. We should log.
self.run_command(command, error_handler=self.ignore_error)
self.run_command(command, error_handler=self.log_error)
return
try:
......@@ -142,7 +142,7 @@ class Executive(object):
os.waitpid(pid, os.WNOHANG)
except OSError as error:
if error.errno == errno.ESRCH:
# The process does not exist.
_log.debug("PID %s does not exist.", pid)
return
if error.errno == errno.ECHILD:
# Can't wait on a non-child process, but the kill worked.
......@@ -265,6 +265,10 @@ class Executive(object):
def ignore_error(error):
pass
@staticmethod
def log_error(error):
_log.debug(error)
def _compute_stdin(self, user_input):
"""Returns (stdin, string_to_communicate)"""
# FIXME: We should be returning /dev/null for stdin
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment