Include -Wunreachable-code when building.
[sysvinit.git] / doc / bootlogd.README
2 bootlogd: a way to capture all console output during bootup
3 in a logfile.
5 - bootlogd opens /dev/console and finds out what the real console is
6 with an ioctl() if TIOCCONS is available
7 - otherwise bootlogd tries to parse /proc/cmdline for console=
8 kernel command line arguments
9 - then opens the (most probable) real console
10 - allocates a pty pair
11 - redirects console I/O to the pty pair
12 - then goes in a loop reading from the pty, writing to the real
13 console and a logfile as soon as a r/w partition is available,
14 buffering in memory until then.
16 As soon as bootlogd exits or gets killed, the pty is closed and the
17 redirection will be automatically undone by the kernel. So that's
18 pretty safe.