diff options
author | Ben Chan <benchan@chromium.org> | 2017-01-10 15:32:11 -0800 |
---|---|---|
committer | Sen Jiang <senj@google.com> | 2017-05-31 15:56:02 -0700 |
commit | 7f4bc3f009c711b5bd1bd145f7f53cd837ed6414 (patch) | |
tree | e6b759306bcb13bd385b20b78413409cf14ac27d /common/error_code_utils.cc | |
parent | 80098619176a8031b6fde1a57513c12e06a2e1e1 (diff) |
update_engine: resume suspended PostInstall action to handle termination
PostinstallRunnerActionTest.RunAsRootCancelPostinstallActionTest exposes
an issue when PostinstallRunnerAction tries to terminate an action that
has been suspended. PostinstallRunnerAction::TerminateProcessing() uses
Subprocess::KillExec() to terminate the action by sending SIGTERM to the
child process associated with the action. However, if the action has
been suspended by PostinstallRunnerAction::SuspendAction(), the child
process won't receive the SIGTERM until it's resumed. This CL changes
PostinstallRunnerAction::TerminateProcessing() to resume the child
process after issuing SIGTERM.
BUG=chromium:678643
TEST=Verified that no orphaned 'sleep' process is left after running
PostinstallRunnerActionTest.RunAsRootCancelPostinstallActionTest.
Reviewed-on: https://chromium-review.googlesource.com/426878
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
(cherry picked from commit f13a40924e0b1d71df07738078cebc933dd90a7e)
Change-Id: I631da8bb5bf29141623f3eef3fc7c438cbccc98a
Diffstat (limited to 'common/error_code_utils.cc')
0 files changed, 0 insertions, 0 deletions