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.
Change-Id: I2e00be7eb5ef44f5cf9a7f151c4f9085854f34b5
Reviewed-on: https://chromium-review.googlesource.com/427059
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
1 file changed