.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\" @(#)init.8 6.2 (Berkeley) %G%
init \- process control initialization
is invoked inside UNIX as the last step in the boot procedure.
It normally then runs the automatic reboot sequence as described in
and if this succeeds, begins multi-user operation.
If the reboot fails, it commences single user operation by giving
the super-user a shell on the console. It is possible to pass parameters
so that single user operation is commenced immediately.
When such single user operation is terminated by killing the single-user
shell (i.e. by hitting ^D),
without the reboot parameter.
performs housekeeping operations
such as removing temporary files,
mounting file systems, and starting
role is to create a process for each
terminal port on which a user may log in.
To begin such operations, it reads the file
executes a command for each terminal specified in the file.
This command will usually be
opens and initializes the terminal line,
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
entry is made only if a user logged in successfully on the line.
Then the appropriate terminal is reopened and
signal (signal SIGHUP) and interprets it to mean that
The Shell process on each line which used to be active
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 terminal lines without
rebooting the system by changing the
process: use `kill \-HUP 1.'
will terminate multi-user operations and resume single-user mode
if sent a terminate (TERM) signal, i.e. ``kill \-TERM 1''.
If there are processes outstanding which are deadlocked (due to
hardware or software failure),
will not wait for them all to die (which might take forever), but
will time out after 30 seconds and print a warning message.
and allow the system to slowly die away, if it is sent a terminal stop (TSTP)
signal, i.e. ``kill \-TSTP 1''. A later hangup will resume full
multi-user operations, or a terminate will initiate a single user shell.
role is so critical that if it dies, the system will reboot itself
If, at bootstrap time, the
process cannot be located, the system will loop in user mode at location
\fB/etc/getty\fP \fIgettyargs\fP\fB failing, sleeping\fP.
A process being started to service a line is exiting quickly
This is often caused by a ringing or noisy terminal line.
.I Init will sleep for 30 seconds, then continue trying to start the process.
\fBWARNING: Something is hung (wont die); ps axl advised\fR. A process
is hung and could not be killed when the system was shutting down.
This is usually caused by a process
which is stuck in a device driver due to a persistent device error condition.
login(1), kill(1), sh(1), ttys(5), crash(8V), getty(8), rc(8), reboot(8),