Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ init(8) — BSD/386 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fastboot(8)

ps(1)

getty(8)

sh(1)

ttys(5)

wait(3)

reboot(8)

rc(8)

halt(8)

utmp(5)

INIT(8)                   BSD System Manager's Manual                  INIT(8)

NAME
     init - master system process

SYNOPSIS
     /sbin/init [-s]

DESCRIPTION
     init is the ancestress of all user processes, and is started by the ker-
     nel as one of the last steps of the normal bootstrap process.  init, by
     definition, always has a PID of 1.

     When invoked with the -s flag [passed down by the kernel from the boot-
     strap load process], init places the system in single user mode by start-
     ing /bin/sh on the console.  If this shell exits gracefully, the system
     is then promoted to multiuser mode (see below).

     When init is invoked without the -s flag, or a single user shell termi-
     nates gracefully, the system is brought up in multiuser mode.  At this
     time, init executes the /etc/rc script using /bin/sh as the shell.  If
     this script exits successfully, init then starts a process (usually
     /usr/libexec/getty ) for each tty listed in /etc/ttys. See ttys(5) for
     more detail on this aspect of init.

     As the ancestress of all user processes, init adopts all orphaned chil-
     dren processes whose parents have exited without doing a wait(3) on them.
     Thus, it is quite common to see processes listed by ps(1) as having a
     PPID of 1.  When any of these children exit, init kindly does a wait(3)
     on them to collect resource usage information.

     In the unfortunate event that init should ever die, the system stops
     abruptly.  Likewise, if /sbin/init is not present in the root filesystem
     at boot time, the system will not come up far enough to be useful.  Both
     of these situations should be avoided whenever possible.  init, however,
     responds favorably (?) to the following signals:

     SIGHUP  Re-reads /etc/ttys and makes appropriate changes in list of run-
             ning gettys.

     SIGTERM
             User processes are killed and a single user shell is started on
             the console.

     SIGTSTP
             Existing user processes are not harmed but no new gettys are
             started.  A subsequent SIGHUP will return the system to normal
             operation, or a SIGTERM will finish off the process by dropping
             the system into single user mode.

FILES
     /etc/ttys      Terminal initialization information
     /etc/rc        System startup files
     /dev/tty*      Common tty devices
     /dev/console   Console device
     /var/run/utmp  Record of current users on the system

SEE ALSO
     fastboot(8),  ps(1),  getty(8),  sh(1),  ttys(5),  wait(3),  reboot(8),
     rc(8),  halt(8),  utmp(5)

BUGS
     While it's possible to change lines in /etc/ttys and then send a SIGHUP
     to init, adding, deleting, or rearranging lines is a Bad Idea.  If you do
     this, reboot the system afterwards.

HISTORY
     init originally appeared in Version 6 AT&T UNIX.  This particular version
     of init was written from scratch by Donn Seeley for BSD4.4.  This manual
     page and its inaccuracies were written by Trent Hein.

BSDI BSD/386                    March 27, 1993                               2




























































Typewritten Software • bear@typewritten.org • Edmonds, WA 98026