init - process control initialization
S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
/
\b/e
\bet
\btc
\bc/
\b/i
\bin
\bni
\bit
\bt
D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
_
\bI_
\bn_
\bi_
\bt is invoked inside UNIX as the last step in the boot
procedure. It normally then runs the automatic reboot
sequence as described in _
\br_
\be_
\bb_
\bo_
\bo_
\bt(8), and if this succeeds,
begins multi-user operation. If the reboot fails, it com-
mences single user operation by giving the super-user a
shell on the console. It is possible to pass parameters
from the boot program to _
\bi_
\bn_
\bi_
\bt so that single user operation
is commenced immediately. When such single user operation
is terminated by killing the single-user shell (i.e. by hit-
ting ^D), _
\bi_
\bn_
\bi_
\bt runs /_
\be_
\bt_
\bc/_
\br_
\bc without the reboot parameter.
This command file performs housekeeping operations such as
removing temporary files, mounting file systems, and start-
In multi-user operation, _
\bi_
\bn_
\bi_
\bt'_
\bs 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 /_
\be_
\bt_
\bc/_
\bt_
\bt_
\by_
\bs and executes a
command for each terminal specified in the file. This com-
mand will usually be /_
\bu_
\bs_
\br/_
\bl_
\bi_
\bb_
\be_
\bx_
\be_
\bc/_
\bg_
\be_
\bt_
\bt_
\by. _
\bG_
\be_
\bt_
\bt_
\by opens and
initializes the terminal line, reads the user's name and
invokes _
\bl_
\bo_
\bg_
\bi_
\bn 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. The main path of _
\bi_
\bn_
\bi_
\bt, which has been waiting
for such an event, wakes up and removes the appropriate
entry from the file _
\bu_
\bt_
\bm_
\bp, which records current users, and
makes an entry in /_
\bv_
\ba_
\br/_
\bl_
\bo_
\bg/_
\bw_
\bt_
\bm_
\bp, which maintains a history
of logins and logouts. The _
\bw_
\bt_
\bm_
\bp entry is made only if a
user logged in successfully on the line. Then the appropri-
ate terminal is reopened and _
\bg_
\be_
\bt_
\bt_
\by is reinvoked.
_
\bI_
\bn_
\bi_
\bt catches the _
\bh_
\ba_
\bn_
\bg_
\bu_
\bp signal (signal SIGHUP) and inter-
prets it to mean that the file /_
\be_
\bt_
\bc/_
\bt_
\bt_
\by_
\bs should be read
again. The Shell process on each line which used to be
active in _
\bt_
\bt_
\by_
\bs 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 _
\bt_
\bt_
\by_
\bs file and sending a _
\bh_
\ba_
\bn_
\bg_
\bu_
\bp signal to the _
\bi_
\bn_
\bi_
\bt pro-
_
\bI_
\bn_
\bi_
\bt 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), _
\bi_
\bn_
\bi_
\bt
will not wait for them all to die (which might take for-
ever), but will time out after 30 seconds and print a warn-
_
\bI_
\bn_
\bi_
\bt will cease creating new _
\bg_
\be_
\bt_
\bt_
\by's and allow the system to
slowly die away, if it is sent a terminal stop (TSTP) sig-
nal, i.e. ``kill -TSTP 1''. A later hangup will resume full
multi-user operations, or a terminate will initiate a single
user shell. This hook is used by _
\br_
\be_
\bb_
\bo_
\bo_
\bt(8) and _
\bh_
\ba_
\bl_
\bt(8).
_
\bI_
\bn_
\bi_
\bt'_
\bs role is so critical that if it dies, the system will
reboot itself automatically. If, at bootstrap time, the
_
\bi_
\bn_
\bi_
\bt process cannot be located, the system will loop in user
D
\bDI
\bIA
\bAG
\bGN
\bNO
\bOS
\bST
\bTI
\bIC
\bCS
\bS
/
\b/u
\bus
\bsr
\br/
\b/l
\bli
\bib
\bbe
\bex
\bxe
\bec
\bc/
\b/g
\bge
\bet
\btt
\bty
\by _
\bg_
\be_
\bt_
\bt_
\by_
\ba_
\br_
\bg_
\bs f
\bfa
\bai
\bil
\bli
\bin
\bng
\bg,
\b, s
\bsl
\ble
\bee
\bep
\bpi
\bin
\bng
\bg. A process
being started to service a line is exiting quickly each time
it is started. This is often caused by a ringing or noisy
terminal line. _
\bI_
\bn_
\bi_
\bt _
\bw_
\bi_
\bl_
\bl _
\bs_
\bl_
\be_
\be_
\bp _
\bf_
\bo_
\br _
\b3_
\b0 _
\bs_
\be_
\bc_
\bo_
\bn_
\bd_
\bs,
W
\bWA
\bAR
\bRN
\bNI
\bIN
\bNG
\bG:
\b: S
\bSo
\bom
\bme
\bet
\bth
\bhi
\bin
\bng
\bg i
\bis
\bs h
\bhu
\bun
\bng
\bg (
\b(w
\bwo
\bon
\bnt
\bt d
\bdi
\bie
\be)
\b);
\b; p
\bps
\bs a
\bax
\bxl
\bl a
\bad
\bdv
\bvi
\bis
\bse
\bed
\bd. 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
/dev/console, /dev/tty*, /var/run/utmp, /var/log/wtmp,
S
\bSE
\bEE
\bE A
\bAL
\bLS
\bSO
\bO
login(1), kill(1), sh(1), ttys(5), crash(8V), getty(8),
rc(8), reboot(8), halt(8), shutdown(8)