Console and Shell

Garrett Cooper youshi10 at
Tue Jan 16 01:54:11 UTC 2007

On Jan 15, 2007, at 5:51 PM, Garrett Cooper wrote:

> 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

Sorry ><. Wrong list (for hackers@)..

More information about the freebsd-questions mailing list