S.PRGD - swap current program descriptor.

Usage:

newname = s.prgd(subsys);

Examples:

if ('mail' != s.prgd('mail'))
    error("Could not assume MAIL privileges*n");

Where:

subsys
contains the ASCII name of the subsystem to be switched to.
newname
contains the name of the current subsystem after the call has finished. If the call fails because the requested subsystem does not exist, the current subsystem is not changed and its name is returned.

Description:

S.PRGD allows a program to change the name of the subsystem it is working as, and hence assume the privileges of some other subsystem. S.PRGD is frequently used to get rid of permissions, by assuming the privileges of a less privileged subsystem after all privileged operations have been completed.

Since S.PRGD uses DRL T.EXEC, it may only be issued by privileged programs. S.PRGD is not supported under TS8.

Copyright © 1996, Thinkage Ltd.