Mark main log closed on write failure
authorDavin McCall <davmac@davmac.org>
Sun, 29 Dec 2019 04:16:12 +0000 (14:16 +1000)
committerDavin McCall <davmac@davmac.org>
Sun, 29 Dec 2019 04:16:12 +0000 (14:16 +1000)
commitd48b25fec7303580c573e688820514844e5e0e39
tree7af0288140c42df0d12e92d99dedcf8120fc7b1a
parent320ab1b43c8ff7b84dacee256f744ba664bd0c2f
Mark main log closed on write failure

Record the main log as being closed (external_log_open false) if there
is a write failure while trying to write the log buffer. This allows the
log to be re-opened by restarting the logging service.

Also we avoid waiting for the log buffer to flush if it has failed.
src/dinit-log.cc
src/dinit.cc
src/tests/test-dinit.cc
src/tests/test-includes/dinit.h