File: bootlogd.README

package info (click to toggle)
sysvinit 2.88dsf-13.1+squeeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,512 kB
  • ctags: 808
  • sloc: ansic: 8,578; sh: 3,486; perl: 535; makefile: 364
file content (19 lines) | stat: -rw-r--r-- 714 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

bootlogd: a way to capture all console output during bootup
          in a logfile.

- bootlogd opens /dev/console and finds out what the real console is
  with an ioctl() if TIOCCONS is available
- otherwise bootlogd tries to parse /proc/cmdline for console=
  kernel command line arguments
- then opens the (most probable) real console
- allocates a pty pair
- redirects console I/O to the pty pair
- then goes in a loop reading from the pty, writing to the real
  console and a logfile as soon as a r/w partition is available,
  buffering in memory until then.

As soon as bootlogd exits or gets killed, the pty is closed and the
redirection will be automatically undone by the kernel. So that's
pretty safe.