shl(1) shl(1)
NAME
shl - shell layer manager
SYNOPSIS
shl
DESCRIPTION
shl is a shell layer manager that allows you to simultaneously
interact with more than one shell from a single terminal.
You can control the behavior of each of these shells, known as layers,
using the commands described below.
You are free to decide which type of shell (sh, jsh, ksh or csh) to
use in each layer.
shl requires at least one entry for a virtual terminal in the /dev/sxt
directory. These entries consist of the digits in the name of a vir-
tual terminal. If no such entry exists, shl will exit with an error
message.
Functionality
shl is a management program with which you can create and control
individual layers. It binds each layer to a virtual terminal device
(/dev/sxt) which can be manipulated stty and ioctl like a normal ter-
minal line.
When you invoke shl, you are immediately prompted to enter commands to
create at least one layer. The shl manager uses its own prompt >>>, to
help to distinguish it from a layer. After creating a layer, the layer
manager passes control to the shell of that layer, which displays its
PS1 prompt variable as set by shl (see below).
This layer is called the current layer, and the shell called by shl is
the process group leader as in the case of a login shell. Each layer
thus has its own process group ID. The type of shell called in the
layer is determined by the value of the SHELL variable. You can have
up to seven layers running concurrently.
The input from your terminal is read either by the layer manager or by
the current layer. If another layer process attempts to read from
standard input, i.e. from the terminal, it is blocked until its layer
is made the current layer. The stty character swtch (set to <CTRL-Z>
if undefined) can be used to switch control from a current layer to
the layer manager at any time.
All layers can write their standard output to the terminal, unless you
have explicitly blocked the output of individual layers.
You can do this by entering an appropriate shl command or by invoking
the stty command with the loblk (layer output blocking) option. The
Page 1 Reliant UNIX 5.44 Printed 11/98
shl(1) shl(1)
block can be removed by setting the stty option -loblk or by activat-
ing the layer.
Caution:
If you are using a shell with job control, the swtch character
must be redefined (see stty) to avoid disabling the suspend char-
acter.
Commands
The following commands may be issued in response to the >>> prompt of
the shell layer manager. Any unique abbreviation (prefix) may be used.
The names (1) through (7) may be abbreviated to just the digit.
A name is a sequence of characters delimited by a blank, tab or new-
line. Only the first eight characters are significant. The names (1)
through (7) cannot be used when creating a layer (see create below).
They are used as default names by shl when no name argument is sup-
plied to create.
create[ name]
Creates a layer called name and makes it the current layer.
If no name argument is supplied, shl assigns a name formed by
taking the last digit of the name of the virtual device bound to
the layer and placing it in parentheses, e.g. (3) for
/dev/sxt/003.
The shell prompt variable PS1 is set to the name of the layer
followed by a space. A maximum of seven layers can be created.
block name[ name]...
When the named layer is not the current layer, the standard out-
put of its processes will be blocked. This command is equivalent
to running stty loblk (layer output blocking) within the layer.
delete name[ name]...
Terminates the named layer(s). All processes in the process group
of the named layers are sent the SIGHUP signal [see signal(2)].
help or ?
Writes the syntax of the shl commands on the standard output.
layers[ -l][ name]...
Lists the name and process group ID of each named layer on stan-
dard output.
The -l option produces a detailed listing similar to that of the
ps command. If no name arguments are supplied, information for
all existing layers is listed on standard output.
resume[ name]
Page 2 Reliant UNIX 5.44 Printed 11/98
shl(1) shl(1)
Makes the named layer the current layer. If no name argument is
supplied, the last existing current layer will be activated.
toggle
Activates the layer that was current before the last current
layer.
unblock name[ name]...
For each name, the standard output of processes in the corre-
sponding layer will not be blocked when it is not the current
layer. This command is equivalent to running stty -loblk (layer
output blocking) within the layer.
quit This command terminates shl. The SIGHUP signal is sent to the
processes of all layers.
name The layer referenced by name is made the current layer.
ENVIRONMENT VARIABLE
SHELL Variable defining the command interpreter to invoke.
LOCALE
The LCMESSAGES environment variable governs the language in which
message texts are displayed. If LCMESSAGES is undefined or is defined
as the null string, it defaults to the value of LANG. If LANG is like-
wise undefined or null, the system acts as if it were not internation-
alized.
The LCALL environment variable governs the entire locale. LCALL
takes precedence over all the other environment variables which affect
internationalization.
Page 3 Reliant UNIX 5.44 Printed 11/98
shl(1) shl(1)
EXAMPLES
Typical sequence of operations performed with shl:
$ shl
create one
one
...
<CTRL-Z>
create
(3)
...
<CTRL-Z>
layers -l
(3)
<CTRL-Z>
toggle
one
...
<CTRL-Z>
quit
$
FILES
/dev/sxt/??[0-7]
Virtual terminal device.
SEE ALSO
sh(1), stty(1), ioctl(2), signal(2), sxt(7).
Page 4 Reliant UNIX 5.44 Printed 11/98