HPlogo Using NS 3000/iX Network Services: HP 3000 MPE/iX Computer Systems > Chapter 7 Remote Process Management

RPMCONTROL

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Controls the execution of an existing process that was created by an RPMCREATE.

Syntax

RPMCONTROL       (pd [,location][,loclen],reqcode [,wrtdata][,wrtlen]                 [,readdata][,readlen][,flags][,result])

Parameters

pd (input)

16-byte array, by value. Eight word program descriptor identifying the remote process to access.

location (input)

Character array, by reference. Character string identifying the node on which the remote process resides.

loclen (input)

32-bit integer, by value. Length in bytes of the location parameter.

reqcode (input)

32-bit integer, by value. The number signifying the request for the RPMCONTROL call. Currently defined options for RPMCONTROL are:

  • 20001 — Suspend execution of the remote process. No data is required, and none is returned.

  • 20002 — Resume execution of the remote process at the point it was suspended. No data is required, and none is returned.

wrtdata (input)

Byte array, by reference. Any data to be sent to the remote side for the request.

wrtlen (input)

32-bit integer, by value. Length, in bytes of wrtdata.

readdata (output)

Byte array, by reference. Data to be returned to the caller.

readlen (input/output)

32-bit integer, by reference. On input, it is the maximum number of bytes expected in the readdata parameter. On output, it is the actual number of bytes received in the readdata parameter.

flags (input)

32 bits, by reference. A bit representation of various options. No flags are currently defined.

result (output)

32-bit integer, by reference. The result of the RPMCONTROL request; zero if no error.

Description

This intrinsic is used to control a remote process that was created with an RPMCREATE request. The only RPM control requests defined are suspend and resume.

Its calling sequence is similar to that of IPCCONTROL. The pd and reqcode parameters are the only required parameters. To control a remote process from a process which is not its creator, the location and loclen must be specified. RPMCONTROL uses these parameters to establish a new connection to the remote machine to perform the request.

The wrtdata and wrtlen parameters must be specified if the reqcode specified requires data to be transferred to the remote node.

Similarly, readdata and readlen should be included if the reqcode specified returns data to the caller upon completion of the request. Presently, there are no request codes that require these parameters.

The ability to specify the suspend and resume request codes (20001, 20002) in an RPMCONTROL request is limited to programs that have Privileged Mode (PM) capability. Great care should be taken when using these request codes. If a locally created process is suspended, (that is, a process that was created with a location and logon matching that of the caller, or the location and logon were omitted or blank), and the creator terminates without issuing either an RPMKILL or an RPMCONTROL with the resume request code, the creator process may hang. Therefore, these functions should not be used to manipulate locally created processes unless absolutely necessary.

If the process to be suspended is on a remote node, there is no danger of hanging the process. However, a process that has been suspended in this manner cannot be killed or resumed except by explicitly calling either RPMKILL or RPMCONTROL with the resume request code.

If a process is in a state where the node cannot suspend it, RPMCONTROL will return an error code in the result parameter indicating this. A process may not be suspendable because: the process is suspended by a system process, the process is waiting for critical resources, or the process is dying.

Feedback to webmaster