Correct the ttys.5 and init.8 manpages with respect to the incorrect
assumption that only getty processes can be managed. Describe the SysV-like ability to keep arbitrary long-running processes alive using a non-device first field in /etc/ttys. PR: 12767 Submitted by: Peter Jeremy <peter.jeremy@alcatel.com.au>
This commit is contained in:
parent
8d133d9561
commit
f0f4f75620
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=54199
@ -56,9 +56,11 @@ Blank lines and comments may appear anywhere in the file; comments
|
||||
are delimited by hash marks (``#'') and new lines.
|
||||
Any unspecified fields will default to null.
|
||||
.Pp
|
||||
The first field is the
|
||||
The first field is normally the
|
||||
name of the terminal special file as it is found in
|
||||
.Pa /dev .
|
||||
However, it can be any arbitrary string
|
||||
when the associated command is not related to a tty.
|
||||
.Pp
|
||||
The second field of the file is the command to execute for the line,
|
||||
usually
|
||||
@ -125,6 +127,14 @@ If no group is specified, then the tty becomes a member of the group
|
||||
"none".
|
||||
For backwards compatibility, the ``group='' should appear last on the
|
||||
line, immediately before the optional comment.
|
||||
.Pp
|
||||
Both the second field and any command specified with ``window=''
|
||||
will be split into words and executed using
|
||||
.Xr execve 2 .
|
||||
Words are separated by any combinations of tabs and spaces.
|
||||
Arguments containing whitespace should be enclosed in single quotes
|
||||
.Pq ' .
|
||||
Note that no shell-style globbing or other variable substitution occurs.
|
||||
.Sh EXAMPLES
|
||||
.Bd -literal
|
||||
# root login on console at 1200 baud
|
||||
|
@ -152,7 +152,11 @@ maintains
|
||||
processes for the terminal ports found in the file
|
||||
.Xr ttys 5 .
|
||||
.Nm Init
|
||||
reads this file, and executes the command found in the second field.
|
||||
reads this file and executes the command found in the second field,
|
||||
unless the first field refers to a device in
|
||||
.Pa /dev
|
||||
which is not configured.
|
||||
The first field is supplied as the final argument to the command.
|
||||
This command is usually
|
||||
.Xr getty 8 ;
|
||||
.Nm getty
|
||||
@ -182,6 +186,18 @@ executing a new
|
||||
.Nm getty
|
||||
for the line.
|
||||
.Pp
|
||||
.Nm Init
|
||||
can also be used to keep arbitrary daemons running,
|
||||
automatically restarting them if they die.
|
||||
In this case, the first field in the
|
||||
.Xr ttys 5
|
||||
file must not reference the path to a configured device node
|
||||
and will be passed to the daemon
|
||||
as the final argument on its command line.
|
||||
This is similar to the facility offered in the
|
||||
.At V
|
||||
.Pa /etc/inittab .
|
||||
.Pp
|
||||
Line status (on, off, secure, getty, or window information)
|
||||
may be changed in the
|
||||
.Xr ttys 5
|
||||
@ -205,10 +221,8 @@ For any lines that were previously turned off in the
|
||||
.Xr ttys 5
|
||||
file and are now on,
|
||||
.Nm
|
||||
executes a new
|
||||
.Nm getty
|
||||
to enable a new login.
|
||||
If the getty or window field for a line is changed,
|
||||
executes the command specified in the second field.
|
||||
If the command or window field for a line is changed,
|
||||
the change takes effect at the end of the current
|
||||
login session (e.g., the next time
|
||||
.Nm
|
||||
@ -238,8 +252,7 @@ will not wait for them all to die (which might take forever), but
|
||||
will time out after 30 seconds and print a warning message.
|
||||
.Pp
|
||||
.Nm Init
|
||||
will cease creating new
|
||||
.Nm getty Ns 's
|
||||
will cease creating new processes
|
||||
and allow the system to slowly die away, if it is sent a terminal stop
|
||||
.Pq Dv TSTP
|
||||
signal, i.e.
|
||||
|
Loading…
Reference in New Issue
Block a user