10.3 hamon_patrolstart (starts UAP monitoring)
Format
#include <HA_mon_uap.h> long hamon_patrolstart(int signum,int *inf,void *opt);
Description
The hamon_patrolstart function issues a request to HA Monitor to start monitoring of the UAP.
For a UAP to be started, the program name specified in the name operand in the monitor-mode program environment definition must be set in the HAMON_UAPNAME environment variable.
If nouse is set in the HAMON_API_PATROL environment variable, the function returns with return code 0 without issuing a request to HA Monitor.
For details about the UAP environment variables, see 6.16.2 Specifying UAP environment variables.
Arguments whose values are to be set by the UAP
-
signum
Specifies a signal number. Specify either 0 or the number of a signal that can be acquired for this value. If you want to monitor UAP processes as well as the UAP operation reports, specify a nonzero value. If you want to monitor only UAP processes, specify 0.
If a nonzero value is specified in this argument but the patrol operand is omitted in the monitor-mode program environment definition, HA Monitor monitors only the UAP processes.
-
opt
This is a reserved area. Specify NULL.
Arguments whose values are returned by HA Monitor
-
inf
This area is used for returning a detail code in the event of an error. For details about the detail codes, see 10.5 List of detail codes below.
Return codes
Value |
Meaning |
---|---|
0 |
HA Monitor will begin monitoring the UAP that issued this function. |
-1 |
An error occurred. HA Monitor will not monitor the UAP that issued this function. If HA Monitor is already monitoring the UAP, it continues to monitor it. For details, see 10.5 List of detail codes below. |
Notes
-
Do not issue this function multiple times consecutively from the same process.
-
Only a single thread can issue the API per process.