update_engine: clean up sleep process in P2PManagerTest.LookupURL
P2PManagerTest.LookupURL terminates a 'sh' process, which is put into
sleep by executing `sleep 2`. 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
P2PManagerTest.LookupURL.
Change-Id: I05aaf14ee39ff77a7a2040f97a19bcc9d70046a8
Reviewed-on: https://chromium-review.googlesource.com/427060
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
1 file changed