File: bootlogd.README

package info (click to toggle)
sysvinit 2.84-2woody1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 652 kB
  • ctags: 463
  • sloc: ansic: 5,282; sh: 1,193; perl: 158; makefile: 156
file content (17 lines) | stat: -rw-r--r-- 612 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

bootlogd: a way to capture all console output during bootup
          in a logfile. ** PROOF OF CONCEPT IMPLEMENTATION **

- bootlogd opens /dev/console
- finds out what the real console is with an ioctl()
- then opens the 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.