shutdown: push all output through a cyclic buffer.
authorDavin McCall <davmac@davmac.org>
Fri, 6 Apr 2018 18:25:04 +0000 (19:25 +0100)
committerDavin McCall <davmac@davmac.org>
Fri, 6 Apr 2018 20:56:18 +0000 (21:56 +0100)
commitec7899acefb40a7438114224abf7de8982829ae5
treed3972678b4d4f6c5a76458870eb265c4de2aae45
parentcd0039ba8d216e4c44e23bfd55bdad08f87293b7
shutdown: push all output through a cyclic buffer.

Push all output, including from subprocesses, through a cyclic
buffer, and discard buffer contents if it cannot be output fast
enough. I.e. shutdown should not hang if the console is blocked
(such as due to a hardware issue with serial console, or user
having pressed ctrl+S to stop console output on a VT).
TODO
src/includes/cpbuffer.h
src/shutdown.cc