[blinkpy] Manage the lifecycle of wptserve better
During a recent roll of wpt tools, wptserve was broken and it was very hard to debug. A few changes are made to improve the debuggability and overall code health of wptserve management in blinkpy. * Stop discarding the output of wptserve. Set the logging level to info (the default is debug) and preserve the output, so that it can be dumped out when something goes wrong. * When checking and killing wptserve, we now poll the process before sending the null signal, as `kill -0` a defunct process will still succeed. We can now reap zombies much faster :) * Lastly, _check_and_kill no longer does blocking wait inside. Now, _wait_for_action(_check_and_kill) makes more sense and matches the pattern in ServerBase better; and we send SIGKILL as a last resort (on POSIX). apache_http.py is modified by the way to replace an unnecessary popen with run_command. httpd exits immediately after it spawns the daemon, so there's no use holding onto the defunct main process. Change-Id: I441d36739451ad1e37afc6afe8f3c089cf224822 Reviewed-on: https://chromium-review.googlesource.com/1026889Reviewed-by:Quinten Yearsley <qyearsley@chromium.org> Commit-Queue: Robert Ma <robertma@chromium.org> Cr-Commit-Position: refs/heads/master@{#553619}
Showing
Please register or sign in to comment