⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 init.8

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 8
字号:
.\" SCCSID: @(#)init.8	8.1	9/11/90.TH init 8 VAX.SH Nameinit \- process control initialization.SH Syntax.B /bin/init.SH Description.NXR "init program".NXR "process" "initializing control".NXA "init program" "reboot command"The ULTRIX system invokes the.PN initcommand as the last step in the boot procedure.The system normally then runs the automatic reboot sequence, as described in.MS reboot 8 .If .PN reboot succeeds, .PN initbegins multiuser operation.If .PN reboot fails, .PN initbegins single-user operation by givingthe superuser a shell on the console.  .PPYou can use the BOOT command so that parameters are passedfrom the boot program to.PN initso that multi-user operation begins immediately. When the superuser terminates the single-usershell (by pressing CTRL/D),.PN initruns the.PN /etc/rc command filewithout the reboot parameter.This command fileperforms housekeeping operationssuch as removing temporary files,mounting file systems, and startingdaemons.For further information, see .MS reboot 8 ..PPIn multi-user operation, .PN initcreates a process for eachterminal port where a user may log in.To begin such operations, it reads the file .PN /etc/ttys .For further information, see .MS ttys 5 .For each terminal that is marked ``on'' in the .PN ttysfile, .PN initforks and invokes the command specified for the current line. The command is passed the name of the terminal as thelast argument. The other arguments (if any) are specified after the commandin the .PN ttysfile.Usually, the command is .MS getty 8 , but it may be any command..PPThe .PN gettycommand reads the user's name and invokes.PN loginto log in the user and execute the shell..PPUltimately, the shell terminatesbecause of an end-of-file.  The end-of-file may be typed explicitly or generated as a result of hanging up on a terminal line.The main path of.PN init ,which has been waitingfor such an event,wakes up and removes the appropriate entry from thefile.PN utmp ,which records current users.  The.PN init command then makes an entry in .PN /usr/adm/wtmp ,which maintains a historyof logins and logouts.The.PN wtmpentry is made only if a user logged in successfully on the line.Then the appropriate terminal is reopened and.PN gettyisreinvoked..PP.PN initcatches the.PN hangupsignal (signal SIGHUP) and interprets it to mean thatthe file .PN /etc/ttys should be read again.The shell process on each line which used to be activein.PN ttysbut 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 withoutrebooting the system by changing the.PN ttysfile and sending a.PN hangupsignal to the.PN initprocess, using \f(CWkill \-HUP 1\fP..PPThe.PN initcommand terminates multi-user operations and resumes single-user modeif it receives a terminate (TERM) signal.  That is, thesuperuser types \f(CWkill \-TERM 1\fP.If there are processes outstanding which are deadlocked (due tohardware or software failure),.PN initdoes not wait for them all to die, buttimes out after 30 seconds and prints a warning message..PPIf .PN initreceives a terminal stop signal (the superuser types\f(CWkill \-TSTP 1\fP),.PN initstops creating new processesand lets the system slowly die away. A later hangup will resume fullmulti-user operations, or a terminate will initiate a single user shell.This feature is used by .MS reboot 8 and .MS halt 8 ..PPIf.PN initdies, the system will reboot itselfautomatically.If, at bootstrap time, the.PN initprocess cannot be located, the system will loop in user mode at location0x13..SH Diagnostics.NXR "init program" "diagnostics".B "WARNING: Something is hung (wont die); ps axl advised".brThe system is shutting down, and.PN initcannot kill a certain process. This usually occurs when a processcannot exit a device driverdue to a persistent device error condition..PP.B "init: \fI`command  tty'\fB failing, sleeping".brThe.PN initcommand tried to spawn a new process (use the .MS execve 2 system call)for the \fIcommand\fR five times.  Each time, the \fIcommand\fR failed.  This may indicate that the \fIcommand\fR was invoked withinvalid arguments.  Check the .PN /etc/ttys file for errors.This error message is printed at .MS syslog 3 level LOG_ERR..PP.B "init: exec failed: cmd=\fI  command reason\fB".brThe.PN initcommand tried to spawn a new processusing the .MS execve 2 system call for the \fIcommand\fR.  The .PN execve failed.  The\fIreason\fR is the explanation produced by the .MS perror 3  routine for why the .PN execvefailed.This error message is printed at .MS syslog 3 level LOG_ERR..SH Files.TP 15.PN /etc/utmp List of current system users.TP.PN /usr/adm/wtmp History of logins and logouts.TP.PN /etc/ttys The.PN initcommand reads this file for a command to execute forthe terminal line.TP.PN /etc/rc Command file executed by.PN init.SH See Alsottys(5), getty(8), rc(8), reboot(8)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -