update_engine: Log output of alive subprocesses on exit.
Currently if an update engine spawned subprocess (like postinst) shuts down the
system, the update engine does not include the logs it buffered for that
subprocess in its log and debugging will may become impossible. This patch logs
the buffered output of all alive subprocesses upon exit.
BUG=chromium:818834
BUG=b:74120207
TEST=cros flashed and rebooted the system while UE was running postinst. Then
the postinst log was partially logged in the UE log.
Change-Id: I75035f14e310a43a087511daa2a674794e5f373e
Reviewed-on: https://chromium-review.googlesource.com/954327
Commit-Ready: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Nicolas Norvez <norvez@chromium.org>
3 files changed