3BSD/usr/man/man8/init.vm.8

Compare this file to the similar file:
Show the results in this format:

.TH INIT.VM 8 
.SH NAME
init.vm \- process control initialization
.SH SYNOPSIS
.B /etc/init.vm
.SH DESCRIPTION
.I Init.vm
is invoked inside UNIX as the last step in the boot procedure.
Generally its role is to create a process for each
terminal port on which a user may log in.
.PP
.I init.vm
first opens the console terminal
.I /dev/console
for reading
and writing, and then invokes a Shell.
This feature brings up the system in single-user mode.
The
.I getty.vm
and
.I login
routines mentioned below and described elsewhere are not used yet.
.PP
When the single-user shell terminates
(usually caused by typing an EOT on the console),
.I  init
invokes another Shell, with input taken from the
file
.I /etc/rc.
This command file
performs housekeeping operations
such as removing temporary files,
mounting file systems, and starting
daemons.
.PP
Then
.I init.vm
reads the file
.I /etc/ttys
and
forks several times to create a process
for each terminal specified in the file.
Each of these processes opens the appropriate terminal
for reading and writing.  These channels thus
receive file descriptors 0 and 1, the standard input and
output.
Opening the terminal will usually involve a delay,
since the
.IR open ""
is not completed until someone
is dialed up and carrier established on the channel.
Then
.I /etc/getty.vm
is called with argument as specified by the second character of
the
.I ttys
file line.
.I Getty.vm
reads the user's name and invokes
.I login
to log in the user and execute the Shell.
.PP
Ultimately the Shell will terminate
because of an end-of-file either
typed explicitly or generated as a result of hanging up.
The main path of
.IR init.vm ,
which has been waiting
for such an event,
wakes up and removes the appropriate entry from the
file
.IR utmp ,
which records current users, and
makes an entry in
.IR /usr/adm/wtmp ,
which maintains a history
of logins and logouts.
Then the appropriate terminal is reopened and
.I getty.vm
is
reinvoked.
.PP
.I Init.vm
catches the
.I hangup
signal (signal SIGHUP) and interprets it to mean that
the file
.I /etc/ttys
should be read again.
The Shell process on each line which used to be active
in
.I ttys
but is no longer there is terminated;
a new process is created for each added line;
lines unchanged in the file are undisturbed.
Thus it is possible to drop or add phone lines without
rebooting the system by changing the
.I ttys
file and sending a
.I hangup
signal to the
.I init
process: use `kill \-1 1.'
.PP
To take the system down to a single user system from multi-user
operation, use ``kill 1''.
.SH FILES
/dev/console, /dev/tty?, /etc/utmp, /usr/adm/wtmp, /etc/ttys, /etc/rc
.SH "SEE ALSO"
login(1), kill(1), sh(1), ttys(5), getty.vm(8)