Stop the HAM
#include <ha/ham.h> int ham_stop( void ); int ham_stop_nd( int nd); int ham_stop_node( const char *nodename);
libham
The ham_stop() function instructs the HAM to terminate. The ham_stop_nd(), and ham_stop_node() functions are used to terminate remote HAMs. These are the only proper ways to stop the HAM.
The nd specified to ham_stop_nd() is the node identifier of the remote node at the time the ham_stop_nd() call is made.
The ham_stop_node() function takes as a parameter a fully qualified node name (FQNN). The ham_stop_node() function is used when a nodename is used to specify a remote HAM instead of a node identifier (nd).
Since the HAM and its clone the Guardian monitor each other, and re-spawn should the other fail, the HAM must first terminate the Guardian before it terminates itself.
In addition to the above, the HAM returns any error it encounters while servicing the request to terminate.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |