The TTY plugin might fail in read() with EINVAL if the inotify event
buffer is too small. Fix: set the receive event buffer to the size
recommended in inotify(7). Also add a handler for EINVAL to close and
reinitialize the inotify descriptor so we do not accidentally overrun
the CPU with any unhandled errors.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Try to do better by the user, by default, if no tty is specified in the
finit.conf. This way the user will at least have a way to interact with
the system and repair it.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Add support for runlevels to tty command and support for reading baud
rate and TERM variable from finit.conf.
The tty-watcher thread has been converted to a standard I/O plugin.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>