3.1.2 User server termination
(1) Termination modes
There are two termination modes for a user server:
- Normal termination
Under normal termination, no new messages are accepted, and the user server terminates after completion of processing of all service requests currently in the scheduling queue.
- Forced termination
Under forced termination, the user server terminates immediately, all service requests in the scheduling queue are discarded, and control returns as an error to the client in response to wait status.
(2) Termination methods
Operation commands are used to issue user server termination requests to OpenTP1.
Following are the termination modes and the corresponding operation commands:
- Normal termination: dcsvstop command
- Forced termination: dcsvstop -f command
(3) Relationship between user server's termination form and OpenTP1's termination form
If a user server is terminated forcibly, OpenTP1 cannot terminate normally. OpenTP1 must be terminated normally after restarting and then terminating the user server normally. Alternatively, OpenTP1 must be terminated by other than normal termination (i.e., by forced normal termination, planned termination A, planned termination B, or forced termination).
(4) Handling the application startup requests when the user server (MHP) is terminated
The startup requests for an application are handled as follows if such requests occur when the corresponding MHP is not running, is normally terminated, or is forcibly stopped:
- Startup requests from messages received:
ERREVT2 is started.
- Startup requests from functions issued from user application programs:
ERREVT2 is started (however, ERREVT4 is started for the timer startup)
- An MCF event occurs that causes a startup request to be issued for an application that handles MCF events:
Requests are discarded.
(5) Note
If the user server is directly stopped with the kill command, OpenTP1 may be abnormally terminated.