The mvsprocclp callable service cleans up the z/OS UNIX-related resources for an entire process or on a thread-by-thread basis. After cleaning up resources, the mvsprocclp service terminates the thread or the entire process with the final thread.
Operation | Environment |
---|---|
Authorization: | Supervisor state or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1MPC): | 31-bit |
AMODE (BPX4MPC): | 64-bit |
ASC mode: | Primary mode |
Interrupt status: | Enabled for interrupts |
Locks: | Unlocked |
Control parameters: | All parameters must be addressable by the caller and in the primary address space. |
|
AMODE 64 callers use BPX4MPC with the same parameters.
The name of a fullword status field. The status field is a one-word area that is mapped by BPXYWAST, the WAIT status word. The WAST area should be initialized to zero. If the caller wants to set a specific exit status, then either WASTEXITCODE or WASTSIGTERM should be set. If the invocation of this service causes a full process cleanup to occur and the contents of the status field conform to the allowable exit status values, the contents are made available to the parent when the wait service is issued. For the mapping of the status field and a description of the allowable exit status values see BPXYWAST — Map the wait status word.
Value | Explanation |
---|---|
0 | Thread-related resources were cleaned up for the calling thread. |
1 | Process-related resources were cleaned up for the calling process. |
-1 | The service failed to clean up process resources. |
Return_code | Explanation |
---|---|
EMVSERR | The specified terminating status value did not conform to the allowable values. The call failed with a Return_value of -1 and a Reason_Code of JrInvTermStat. |
The name of a fullword where the mvsprocclp service stores the reason code. The mvsprocclp service returns Reason_code only if Return_value is -1. Reason_code further qualifies the Return_code value. For the reason codes, see z/OS UNIX System Services Messages and Codes.
In these two cases, both the thread-related and process-related resources are cleaned up and z/OS UNIX process termination is performed. See the _exit service for a description of z/OS UNIX process ending.
When semval changes, the waiting chain is searched and other threads may regain control (as with semop, semctl operations). As adjustments are completed, sem_pid and sem_otime are updated for each semaphore set.
If the ThliUndubCallerOnly flag is on in the caller's THLI when the mvsprocclp service is called, mvsprocclp does not attempt to terminate processes in the caller's subtask tree.
You cannot use the ThliUndubCallerOnly flag to clean up the first process dubbed in the address space while other processes exist in the caller's address space. The mvsprocclp service will fail with return code EMVSERR and reason code JRActiveProcess.
For examples of using this callable service, see BPX1MPC (mvsprocclp) examples.