Make stdout/stderr line buffered
Make stdout/stderr line buffered

When tappet is started by systemd, its stdout/stderr are redirected to
the journal (because DefaultStandardOutput and DefaultStandardError are
defaulted to journal/inherit respectively in /etc/systemd/system.conf,
unless overriden by StandardOutput/StandardError in the unit file).

Using line buffering makes the output show up faster in the journal, but
journald performs a cgroup membership lookup to determine which unit any
line of output corresponds to, and if a process exits before any of its
output is processed, the output will show up in the journal, but not in
«journalctl -u unit» or «systemctl status unit».

This means that early initialisation errors that lead to the process
exiting will not show up in the first place you would expect them to.

(There appears to be no sane workaround available, though sleeping for
several seconds before exiting would reduce the chances that journald
has not yet identified the output.)

amenonsen/tappet,amenonsen/tappet,amenonsen/tappet