Re: Linux console interface
- From: joseph2k <quiettechblue@xxxxxxxxx>
- Date: Sat, 28 Oct 2006 11:11:28 GMT
MQ wrote:
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)
Is any one able to answer my questions?
MQ
Try thinking of it this way; STDIN/STDOUT/STDERR are all a gift to the
developer from the OS/API/ABI, they are opened for him before the program
starts and are closed automatically upon program exit. It is a very useful
part of OS support for IO redirection. Lots of terminals connected to the
computer was very much part of the computing environment when it was
developed. ncurses, termcap, and termio were all part of the original
multiple users per CPU model for unix.
--
JosephKK
Gegen dummheit kampfen die Gotter Selbst, vergebens.
--Schiller
.
- References:
- Linux console interface
- From: MQ
- Re: Linux console interface
- From: MQ
- Linux console interface
- Prev by Date: Re: writing/finding pci bar0
- Next by Date: Two nodes under /dev/EEPROM/ for one EEPROM
- Previous by thread: Re: Linux console interface
- Next by thread: Re: Linux console interface
- Index(es):
Relevant Pages
|