LIBPROC(3)

NAME
proc.os.getenv, proc.os.setenv, proc.os.setenv.array, proc.run, proc.setenv, proc.wrapper, proc.altable.run, proc.altable.wrapper - KRoC process library

SYNOPSIS
#INCLUDE "proclib.inc"
#USE "proc.lib"
kroc -lproc

PROC proc.os.getenv (RESULT ENVIRONMENT env, VAL []BYTE ident)
PROC proc.os.setenv (VAL ENVIRONMENT env)
PROC proc.os.setenv.array (VAL []ENVIRONMENT env)
PROC proc.run (VAL []ENVIRONMENT env, VAL [][]BYTE command, VAL INT kyb.fd, scr.fd, err.fd, RESULT INT result)
PROC proc.setenv (RESULT ENVIRONMENT env, VAL []BYTE ident, value)
PROC proc.wrapper (VAL []ENVIRONMENT env, VAL [][]BYTE command, CHAN OF BYTE kyb.in, scr.out, err.out, RESULT INT result)

PROC proc.altable.run (CHAN OF BOOL kill, CHAN OF INT response, VAL []ENVIRONMENT env, VAL [][]BYTE command, VAL INT kyb.fd, scr.fd, err.fd, RESULT INT result)
PROC proc.altable.wrapper (CHAN OF BOOL kill, CHAN OF INT response, VAL []ENVIRONMENT env, VAL [][]BYTE command, CHAN OF BYTE kyb.in, scr.out, err.out, RESULT INT result)

DESCRIPTION
The occam process library provides basic functionality to execute other OS programs. The program to run is specified as a [][]BYTE array, whose elements represent arguments for a command line. As all the arguments must be equally sized, the unused portion of the argument must be filled with (BYTE 0) values. When the program runs, it will inherit the current environment. Extra environment variables can be added, or existing ones changed, through the use of the []ENVIRONMENT array passed as parameters. The ENVIRONMENT structure is defined as:
DATA TYPE ENVIRONMENT
PACKED RECORD
[128]BYTE ident:
INT ident.size:
[128]BYTE value:
INT value.size:
:

The elements can either be set explicitly, or proc.setenv can be called to do it. Some additional PROCs deal with the current process's environment, ie, the occam-kernel's environment.

AUTHOR
This manual page is maintained by Fred Barnes <frmb@kent.ac.uk>

SEE ALSO
kroc(1)
doc/bsclib.ps, doc/bsclib/index.html in the KRoC distribution