Commit 70a21191 authored by Ben Chan's avatar Ben Chan Committed by Sen Jiang
Browse files

update_engine: clean up sleep process in SubprocessTest.CancelTest

SubprocessTest.CancelTest terminates a 'sh' process, which is put into
sleep by executing `sleep 60`. Upon receiving SIGTERM, the 'sleep'
process isn't reaped and thus becomes orphaned. As a remedy, this CL
modifies the shell command to trap SIGTERM and kill the 'sleep' process
upon receiving SIGTERM.

BUG=chromium:678643
TEST=Verified that no orphaned 'sleep' process is left after running
SubprocessTest.CancelTest.

Reviewed-on: https://chromium-review.googlesource.com/427059


Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: default avatarBen Chan <benchan@chromium.org>
Reviewed-by: default avatarMike Frysinger <vapier@chromium.org>

(cherry picked from commit efb56850)

Change-Id: I7a94b317b524c6de81e94a1f01c29aeb9b3de85c
parent dc1189f7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment