6.0; xsubs (execute_subsystem), revision 7.0, 83/10/06
usage: XSUBS shell_program [args...]
usage: XSUBS shell_program [args...]
XSUBS invokes a shell program. If the shell program is
a manager for a protected subsystem, it will be executed
inside that subsystem (i.e. with the privileges of the subsystem).
Thus, XSUBS allows shell programs to be written to be managers
for a protected subsystem.
shell_program name of shell program.
args arguments to the shell program.
The invoker of XSUBS must have execute ('x') rights to
the shell program, and the shell program
must be of type 'uasc'.
The shell program is turned into a manager by using
the 'SUBS' command with the '-MGR' option. (See SUBS.)
XSUBS enters the subsystem for which the shell program
is a manager, then invokes a shell to execute the shell program.
Example: an append only list. Anyone can read the list,
and append to the list, but no-one can overwrite previously existing
contents. Assume that the subsystem 'append_only' already exists.
Then the 'APP' shell program, which appends standard input
to an append only file, would look like this:
# APP --- append to an append_only file
SUBS -UP
CATF >>^1 # append to the file passed as first argument
SUBS -DOWN
To make APP a manager of the 'append_only' subsystem, do
ENSUBS append_only # enter subsystem
SUBS APP append_only -MGR
*** EOF ****
A run of APP would look like this:
XSUBS APP aofile # execute APP on 'aofile'
this is the stuff that is appended
*** EOF ***