Managing User Processes [ Process Management Programmer's Guide ] MPE/iX 5.0 Documentation
Process Management Programmer's Guide
Managing User Processes
If you have standard MPE XL capabilities (for example, IA, BA, SF), you
can use many system intrinsics to access operating system features, but
you are allowed only limited programmatic control over processes. For
example, your program cannot use system intrinsics to create a new
process.
If you wish to design large and/or complex applications that use process
management capabilities to full advantage, MPE XL provides Process
Handling (PH) as an optional capability.
PH intrinsics require that the operating system check for additional
capabilities at program load time and/or execution time. To execute any
of the PH intrinsics, you must have the correct capability assigned prior
to running the program.
In order for a program containing PH intrinsics to execute successfully,
the following criteria must be met:
* A System Manager (SM) or Account Manager (AM) must assign the PH
capability to the group where the program is to execute; however, if
the program file is a temporary file, PH must be assigned to the user
who executes the program.
* You must assign the PH capability to the program file at link time
(using the caplist parameter of the :LINK command). The user who
links the program does not need to be assigned the PH capability in
order to assign it to the program file.
MPE XL provides system intrinsics that allow you to create, activate,
suspend, delete, interrogate, and provide communication between
processes. Table 1-1 lists the major tasks involved with managing
processes and the intrinsics required to accomplish each of the tasks.
Also noted is whether or not the intrinsic requires PH capability.
Chapter 2 "Process Management Tasks" , describes how you can use the
intrinsics listed in Table 1-1.
Table 1-1. Process Management Tasks/Intrinsics
----------------------------------------------------------------------------
| |
| To Accomplish This Task: Use these Intrinsics: PH required? |
| |
----------------------------------------------------------------------------
| |
| |
| Create a process CREATEPROCESS YES |
| |
| CREATE YES |
| |
----------------------------------------------------------------------------
| |
| Activate a suspended process ACTIVATE YES |
| |
| CREATEPROCESS YES |
| |
| SUSPEND YES |
| |
----------------------------------------------------------------------------
| |
| Suspend an executing process SUSPEND YES |
| |
| ACTIVATE YES |
| |
| CREATEPROCESS YES |
| |
| PAUSE NO |
| |
| CAUSEBREAK NO |
| |
----------------------------------------------------------------------------
| |
| Delete a process TERMINATE NO |
| |
| KILL YES |
| |
| QUIT NO |
| |
| QUITPROG NO |
| |
----------------------------------------------------------------------------
| |
| Interrogate a process FATHER YES |
| |
| GETPROCID YES |
| |
| GETORIGIN YES |
| |
| GETPROCINFO YES |
| |
| PROCTIME NO |
| |
| PROCINFO NO |
| |
| GETINTO NO |
| |
| GETPRIORITY YES |
| |
----------------------------------------------------------------------------
| |
| Provide communication HPFOPEN, FOPEN NO |
| between |
| |
| process FREAD,FWRITE NO |
| |
| MAIL YES |
| |
| RECEIVEMAIL YES |
| |
| SENDMAIL YES |
| |
| |
----------------------------------------------------------------------------
NOTE If you are interested in the task of providing communication
between processes, refer to Interprocess Communication Programmer's
Guide (32650-90019).
MPE/iX 5.0 Documentation