Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Oct 2008 23:00:15 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        =?koi8-r?B?7cnIwcnMIOvJ0ME=?= <msnkipa@mail.ru>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Where is new session creation in init-getty-login
Message-ID:  <20081029210015.GH18100@deviant.kiev.zoral.com.ua>
In-Reply-To: <E1KvDsg-0005JZ-00.msnkipa-mail-ru@f177.mail.ru>
References:  <E1KvDsg-0005JZ-00.msnkipa-mail-ru@f177.mail.ru>

next in thread | previous in thread | raw e-mail | index | archive | help

--lf0NQ8GVTdtriwpn
Content-Type: text/plain; charset=koi8-r
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Oct 29, 2008 at 07:26:50PM +0300, =ED=C9=C8=C1=C9=CC =EB=C9=D0=C1 w=
rote:
>=20
> 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.

--lf0NQ8GVTdtriwpn
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEARECAAYFAkkIzt4ACgkQC3+MBN1Mb4hv7wCfbsrdZ4y7wZpf0w1nUnYG/Rlj
jUEAn3F9I1+MDMnqHAe9EAvcN4A7t/bR
=nrkc
-----END PGP SIGNATURE-----

--lf0NQ8GVTdtriwpn--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081029210015.GH18100>