[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [BusyBox] Re: distinguishing console and terminal devices
From:       Jim Bauer <jfbauer () nfr ! com>
Date:       2005-05-24 13:51:39
Message-ID: 200505240951.39680.jfbauer () nfr ! com
[Download RAW message or body]

On Tuesday 24 May 2005 06:37, Bahadir Balban wrote:
> Hi,
> 
> I'm a bit confused about terminal devices. console(4) man page says:
> 
> "There are 63 consoles /dev/ttyn where 1<= n <= 63". It also says:
> "The _current_ console is addressed by /dev/console or /dev/tty0"
> 
> On tldp text-terminal how-to it says:
> 
> "/dev/tty stands for the _controlling_ terminal"
> 
> Now is it true that /dev/console = /dev/tty0 = /dev/tty?

They are all different.

/dev/tty always refers to the process's current tty.  If two process
open up /dev/tty and write to it, there is a very good chance the output
will be in two different locations.

The virtual consoles/terminals you can switch to via ctrl-alt-Fx
(or alt-Fx) are /dev/tty1 (F1), /dev/tty2 (F2), /dev/tty3(F3),...
/dev/tty0 always referrs to the currently active one.

/dev/console is used for some kernel messages.  Some other things may
write to it like syslogd.
_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic