Re: Linux console interface



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)".
.



Relevant Pages

  • Re: C# to Linux Interoperability
    ... The question is "interface". ... If you are talking server applications, then you can write web services ... As far as development with c# on Linux: ...
    (microsoft.public.dotnet.languages.csharp)
  • Linux console interface
    ... interface for Linux console applications. ...
    (comp.os.linux.development.system)
  • Re: Is there a list of needed applications?
    ... >> I'm a programmer, and I'm looking to create some applications for Linux. ... > I have looked for a simple CUA interface block character editor like MS-Edit ...
    (alt.os.linux)
  • Re: Is there a list of needed applications?
    ... > I'm a programmer, and I'm looking to create some applications for Linux. ... I have looked for a simple CUA interface block character editor like MS-Edit ...
    (alt.os.linux)
  • Re: HeathField Strange Ideas!
    ... interface that can be included in a program so to interface with the ... console where the user is currently touching the keys. ... In many cases the applications I use, ... machine where I am entering at the keyboard. ...
    (comp.lang.c)