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

[blinkpy] Apply /t to taskkill based on kill_tree

This was likely missed in https://crrev.com/c/1769846. With this change,
kill_tree now works on Windows and Linux in the same way.

Change-Id: Ib5de5bff3ab934846e46ee0e9210d5be5f308dc2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2462197Reviewed-by: default avatarDirk Pranke <dpranke@google.com>
Reviewed-by: default avatarYuke Liao <liaoyuke@chromium.org>
Commit-Queue: Robert Ma <robertma@chromium.org>
Cr-Commit-Position: refs/heads/master@{#815590}
parent fd3ea492
...@@ -126,7 +126,10 @@ class Executive(object): ...@@ -126,7 +126,10 @@ class Executive(object):
NtSuspendProcess(process_handle) NtSuspendProcess(process_handle)
CloseHandle(process_handle) CloseHandle(process_handle)
command = ['taskkill.exe', '/f', '/t', '/pid', pid] command = ['taskkill.exe', '/f']
if kill_tree:
command.append('/t')
command += ['/pid', pid]
# taskkill will exit 128 if the process is not found. We should log. # taskkill will exit 128 if the process is not found. We should log.
self.run_command(command, error_handler=self.log_error) self.run_command(command, error_handler=self.log_error)
return return
......
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