The Shutdown function terminates an Access Module. The structure follows:
typedef struct _pmiShut { char EyeCatcher[pmiMAX_EC_LEN];/* Struct eyecatcher string */ pmUInt32 StructLength; /* Length of this structure */ void *PIData; pmUInt16 Mode; } pmiShut_t;
where the following is true:
Parameter | Field | Description |
---|---|---|
EyeCatcher | input | Structure description string, such as pmShutParms. |
StructLength | input | Total structure length, including the EyeCatcher string. |
PIData | input | Value provided by an Access Module in response to a previous open request call. |
Mode | input | Shutdown mode/option as follows:
|
Return Codes
The following Shutdown return code supplements those listed in Typical Interface Return Codes:
Return Code | Description |
---|---|
pmrcOpenFiles | Files are open. |
Usage Notes
Consider the following when specifying the Shutdown parameters:
- Requirements – A Shutdown function is required when the Reqtype field of the pmiCmdBlock_t structure is pmiPIDMOptShut.
- Housekeeping Operations – The Shutdown function also performs the following housekeeping operations:
- Terminating subprocesses
- Closing open files
- Freeing memory
- Error Conditions – The Shutdown function needs to proceed despite file close errors.