Linux console interface
- From: "MQ" <michaelquinlivan@xxxxxxxxx>
- Date: 26 Oct 2006 20:43:51 -0700
Hi all
I am writing an operating system, and want to provide a compatibility
interface for Linux console applications. Besides the obvious issues
of supporting the Linux system calls and executable formats, there is
the issue of providing a correct simulation of the STDIN, STDOUT and
STDERR interface. However, I find that I have a lack of understanding
about how the console interface works. I am wondering if anybody can
provide me with links to information on this. In particular I have the
following questions:
1. How is STDIN/STDOUT/STDERR opened? Is this done by getty, and then
all applications descended from getty just inherit this?
2. I know that keyboard input is obtained by reading STDIN and screen
output is acheived by writing to STDOUT. How do you send the console
configuration options. You can do this via the termios functions of
the C library, but does the C library acheive this using ioctls? I
think it does, but I thought console ioctls may change between kernel
versions. Should I just support the latest kernel version and risk old
applications breaking if they do ioctls directly (that is not through
termios)?
3. What C module is the top-level terminal driver in the Linux kernel.
That is, the one that is attached to major char device 4? Also, what
is the association between the terminal driver and /dev/console. They
seem to be two separate devices (/dev/console is on major number 5)
regards
MQ
.
- Follow-Ups:
- Re: Linux console interface
- From: MQ
- Re: Linux console interface
- From: Russell Shaw
- Re: Linux console interface
- Prev by Date: Re: question about linux CPU scheduling
- Next by Date: Re: Linux console interface
- Previous by thread: Debugging SCSI scanner drivers??
- Next by thread: Re: Linux console interface
- Index(es):
Relevant Pages
|