Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jan 2007 17:51:08 -0800
From:      Garrett Cooper <youshi10@u.washington.edu>
To:        freebsd-questions@freebsd.org
Subject:   Re: Console and Shell
Message-ID:  <FC4E17FA-DBBE-46BE-86A0-4674781E0579@u.washington.edu>
In-Reply-To: <ecd0bee40701151509r1dd7d798s6f2262aa678efa00@mail.gmail.com>
References:  <ecd0bee40701151509r1dd7d798s6f2262aa678efa00@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Jan 15, 2007, at 3:09 PM, Kailas Ramasamy wrote:

> Hi,
> I would like to understand how the shell is tied to the console  
> port. When
> an user connects a terminal
> to the system via console port, a shell is started and tied to the  
> console
> port (/dev/console ?).
> Can some someone explain how this whole process works?. It would be  
> great if
> you can point me
> the source code and/or the any documents.
>
> Thanks
> Kailas

Why not just go to the source folder for sh (should be under /usr/src/ 
bin/sh/*) and grep for fopen or /dev/tty? Seems like the kernel would  
open up and attach the executing shell to its relevant TTY though  
with getty.
-Garrett



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FC4E17FA-DBBE-46BE-86A0-4674781E0579>