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.
pgpCLvPwHOoyf.pgp
Description: PGP signature
