Commit f13a4092 authored by Ben Chan's avatar Ben Chan Committed by chrome-bot
Browse files

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.

Change-Id: I6852e560550ce2ce49e28733da2b67a7f2e11ca5
Reviewed-on: https://chromium-review.googlesource.com/426878


Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: default avatarBen Chan <benchan@chromium.org>
Reviewed-by: default avatarLuigi Semenzato <semenzato@chromium.org>
Reviewed-by: default avatarMike Frysinger <vapier@chromium.org>
parent 28f9a886
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment