Files
s390-tools/iucvterm/doc/ttyrun.8
Dan Horák 9710f29770 man: Use CR for constant width font
With version 1.23 groff/troff disabled the non-portable font CW and
started to complain about a missing CW font when previewing some of the
man pages, with messages like

$ man --warnings cpumf/man/pai.8 > /dev/null
troff:<standard input>:244: warning: cannot select font 'CW'

Use CR to replace CW.

Closes: https://github.com/ibm-s390-linux/s390-tools/pull/187
[hoeppner@linux.ibm.com: Adapt commit message]
Signed-off-by: Dan Horák <dan@danny.cz>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2025-07-08 10:23:08 +02:00

152 lines
3.5 KiB
Groff

.\" ttyrun.8
.\"
.\"
.\" Copyright IBM Corp. 2010, 2017
.\" s390-tools is free software; you can redistribute it and/or modify
.\" it under the terms of the MIT license. See LICENSE for details.
.\" -------------------------------------------------------------------------
.TH "ttyrun" "8" "December 2011" "s390-tools" "System Management Commands"
.
.ds s ttyrun
.
.
.SH NAME
ttyrun \- Start a program if a specified terminal device is available
.
.
.
.SH SYNOPSIS
.B \*s
.RB [ \-V | \-\-verbose ]
.RB [ \-e | \-\-exitstatus
.IR status ]
.I term
.I program
.RI [ "program_options" ]
.br
.B \*s
.RB [ \-h | \-\-help ]
.br
.B \*s
.RB [ \-v | \-\-version ]
.
.
.
.SH DESCRIPTION
\fB\*s\fP is typically started during system initialization and is used
to prevent a respawn through the
.BR init (8)
program when a terminal is not available.
\fIterm\fP is the name of the terminal device and is a path relative to
the \f(CW/dev\fP directory, for example, specify \f(CWhvc0\fP for
\f(CW/dev/hvc0\fP.
.br
If the specified terminal device can be opened, \fB\*s\fP starts the
specified program.
If the terminal device cannot be opened, the behavior of \fB\*s\fP
depends on the \fB\-e\fP option:
.
.RS 2
.IP "\(bu" 2
If the \fB\-e\fP option has been specified, \fB\*s\fP exits with the
specified return value, or
.IP "\(bu" 2
If the \fB\-e\fP option has not been specified, \fB\*s\fP sleeps until
it receives a signal that causes an exit.
.RE
.PP
\fIprogram\fP is an absolute path to the program to be started by
\fB\*s\fP and \fIprogram_options\fP specify additional arguments.
Depending on the program, arguments might be required. The variable
\f(CW%t\fP in the \fIprogram_options\fP is resolved to the terminal
device specified with \fIterm\fP.
.
.
.
.SH OPTIONS
.TP
.BR \-e ", " \-\-exitstatus\~\fIstatus\fP
Specifies an exit status that is returned when the terminal device
is not available. \fIstatus\fP must be an integer in the range 1 to 255.
You can use this status value in an upstart job file to prevent
respawning.
.
.TP
.BR \-V ", " \-\-verbose
Displays syslog messages.
.
.TP
.BR \-h ", " \-\-help
Displays a short help text, then exits.
.
.TP
.BR \-v ", " \-\-version
Displays the version number of \fB\*s\fP, then exits.
.
.
.
.SH "RETURN VALUES"
\fB\*s\fP exits with one of the following return values to report an
error condition:
.TP
.B 1
\fB\*s\fP has been started with an argument that is not valid or
required but missing.
.TP
.B 2
\fB\*s\fP could open the file specified for \fIterm\fP but the
file is not a terminal device.
.TP
.B 3
\fB\*s\fP could not start the specified program.
.PP
The return values 1 to 3 might also be returned when the \fB\-e\fP
option is used and the terminal device is not available.
.TP
.B 4 \- 255
The terminal device is not available and the \fB\-e\fP option
specifies an exit status in this range.
.
.
.
.SH "EXAMPLES"
.SS inittab
To start \fB/sbin/agetty\fP on terminal device "hvc1", specify:
.PP
.ft CR
.in +0.25in
.nf
h1:2345:respawn:/sbin/\*s hvc1 /sbin/agetty -L 9600 %t linux
.fi
.in -0.25in
.ft
.
.SS upstart job/event files
To start \fB/sbin/agetty\fP on terminal device "hvc1", add the following
settings to the job file:
.PP
.ft CR
.in +0.25in
.nf
respawn
normal exit 42
exec /sbin/\*s -e 42 hvc1 /sbin/agetty -L 9600 %t linux
.fi
.in -0.25in
.ft
.PP
With the normal exit statement, you specify an exit status that will
prevent upstart from respawning the program. To prevent respawning with
\fB\*s\fP, you must specify the same value for the \fB\-e\fP option.
.
.
.
.SH "SEE ALSO"
.BR agetty (8),
.BR mingetty (8),
.BR inittab (5),
.BR events (5)