Re: Linux console interface
- From: Russell Shaw <rjshawN_o@xxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 27 Oct 2006 14:28:27 +1000
MQ wrote:
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)
There's a lot of answers in "Linux Application Development (2nd Edition)".
.
- References:
- Linux console interface
- From: MQ
- Linux console interface
- Prev by Date: Linux console interface
- Next by Date: Re: question about linux CPU scheduling
- Previous by thread: Linux console interface
- Next by thread: Re: Linux console interface
- Index(es):
Relevant Pages
|