Where is new session creation in init-getty-login

Kostik Belousov kostikbel at gmail.com
Wed Oct 29 14:00:20 PDT 2008


On Wed, Oct 29, 2008 at 07:26:50PM +0300, Михаил Кипа wrote:
> 
> I can`t find the place in the source where new session creates when
> I login via local terminal. There is no call to setsid() after init
> forks in start_getty(session_t *sp) and no calls to that function in
> getty and login. But when I login to the local terminal, exit and
> login again I will have different session ID`s (pid numbers of session
> leader process). So I wan`t to know where login process become a
> session leader?

Watch for the login_tty(3) calls both in init and in getty. This function
from libutil sets up the session and controlling terminal. It is called
from init for single-user shell and rc script. getty calls it for
line logons.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20081029/a70d16dd/attachment.pgp


More information about the freebsd-stable mailing list