[comp.os.vms] Using $GETJPI to determine process types

nagy%warner.hepnet@LBL.GOV (Frank J. Nagy/VAX Guru) (10/10/87)

>>     JPI$_JOBTYPE
>>     When JPI$_JOBTYPE is specified, $GETJPI returns the execution mode of
>>     the process at the root of the job tree...
     
>> This "execution mode" is one of the following: detached, network, batch,
>> local, dialup, or remote.
     
>> My question is this: how do I get this information for the process itself,
>> if it happens to be detached or a subprocess?  I can't find any other item
>> in $GETJPI that might do it.  There is JPI$_MODE, but that does not give as
>> much information (just network, batch, interactive, or "other").
     
If JPI$_OWNER returns a non-zero value for the current process, then the
process is a subprocess (the value returned is the PID of the owner of the
subprocess).  If the process is not a subprocess, then it is the root of
the job tree and JPI$_JOBTYPE describes it.

= Frank J. Nagy   "VAX Guru"
= Fermilab Research Division EED/Controls
= HEPNET: WARNER::NAGY (43198::NAGY) or FNAL::NAGY (43009::NAGY)
= BitNet: NAGY@FNAL
= USnail: Fermilab POB 500 MS/220 Batavia, IL 60510