Research V7 development
authorKen Thompson <ken@research.uucp>
Mon, 15 Jan 1979 19:09:23 +0000 (14:09 -0500)
committerKen Thompson <ken@research.uucp>
Mon, 15 Jan 1979 19:09:23 +0000 (14:09 -0500)
Work on file usr/man/man8/init.8

Co-Authored-By: Dennis Ritchie <dmr@research.uucp>
Synthesized-from: v7

usr/man/man8/init.8 [new file with mode: 0644]

diff --git a/usr/man/man8/init.8 b/usr/man/man8/init.8
new file mode 100644 (file)
index 0000000..3caae5e
--- /dev/null
@@ -0,0 +1,97 @@
+.TH INIT 8 
+.SH NAME
+init, rc  \-  process control initialization
+.SH SYNOPSIS
+.B /etc/init
+.br
+.B /etc/rc
+.SH DESCRIPTION
+.I Init
+is invoked as the last step of the boot procedure (see
+.IR boot (8)).
+Generally its role is to create a process for each
+typewriter on which a user may log in.
+.PP
+When
+.I init
+first is executed
+the console typewriter
+.I /dev/console.
+is opened for reading
+and writing and the shell is invoked immediately.
+This feature is used to bring up a single-user system.
+If the shell terminates,
+.I init
+comes up multi-user and the process described below is started.
+.PP
+When
+.I init
+comes up multiuser,
+it
+invokes a shell, with input taken from the
+file
+.I /etc/rc.
+This command file
+performs housekeeping
+like removing temporary files,
+mounting file systems, and starting
+daemons.
+.PP
+Then
+.I init
+reads the file
+.I /etc/ttys
+and
+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,
+output and error files.
+Opening the typewriter 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
+is called with argument as specified by the last character of
+the
+.I ttys
+file line.
+.I Getty
+reads the user's name and invokes
+.IR login (1)
+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 ,
+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 typewriter is reopened and
+.I getty
+is
+reinvoked.
+.PP
+.I Init
+catches the
+hangup signal SIGHUP and interprets it to mean that
+the
+system should be brought from multi user to single
+user.
+Use `kill -1 1' to send the hangup signal.
+.SH FILES
+/dev/tty?, /etc/utmp, /usr/adm/wtmp, /etc/ttys, /etc/rc
+.SH "SEE ALSO"
+login(1), kill(1), sh(1), ttys(5), getty(8)