Using NS3000/iX Network Services (36920-90008)

134 Chapter 7
Remote Process Management
RPMCONTROL
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.