next up previous contents
Next: Streams Up: Treiberkonzepte unter UNIX Previous: Terminaldetails

Einloggen

Der init-Prozeß läuft in einer Endlosschleife, erzeugt getty-Prozesse (,,get terminal'' oder ,,get tty'') und führt Buch darüber, welcher getty-Prozeß welches Terminal eröffnet.

Algorithmus zum Einloggen

algorithm login   /* procedure for logging in */
{
   getty process executes;
   set process group (setpgrp system call);
   open tty line;  /* sleeps until opened */
   if (open successful)
   {
      exec login program;
      prompt for user name;
      turn off echo, prompt for password;
      if (successful)   /* matches password in /etc/passwd */
      {
         put tty in canonical mode (ioctl);
         exec shell;
      }
      else
         count login attempts, try again up to a point;
   }
}


Anke Steuernagel
Thu May 15 18:53:37 MET DST 1997