init, rc \- process control initialization
is invoked as the last step of the boot procedure (see
Generally its role is to create a process for each
typewriter on which a user may log in.
and writing and the shell is invoked immediately.
This feature is used to bring up a single-user system.
comes up multi-user and the process described below is started.
invokes a shell, with input taken from the
like removing temporary files,
mounting file systems, and starting
forks several times to create a process
for each typewriter specified in the file.
Each of these processes opens the appropriate typewriter
for reading and writing. These channels thus
receive file descriptors 0, 1 and 2, the standard input,
Opening the typewriter will usually involve a delay,
is not completed until someone
is dialed up and carrier established on the channel.
is called with argument as specified by the last character of
reads the user's name and invokes
to log in the user and execute the shell.
Ultimately the shell will terminate
because of an end-of-file either
typed explicitly or generated as a result of hanging up.
wakes up and removes the appropriate entry from the
which records current users, and
which maintains a history
Then the appropriate typewriter is reopened and
hangup signal SIGHUP and interprets it to mean that
system should be brought from multi user to single
Use `kill -1 1' to send the hangup signal.
/dev/tty?, /etc/utmp, /usr/adm/wtmp, /etc/ttys, /etc/rc
login(1), kill(1), sh(1), ttys(5), getty(8)