To stop the HAM, you must use either the ham_stop() function or the hamctrl utility. These are the only correct (and the only guaranteed) ways to stop the HAM.
The ham_stop() function or the hamctrl utility instructs a HAM to terminate. The HAM in turn first instructs the Guardian to terminate, and then terminates itself. To stop the HAM from the command line, use the hamctrl utility:
hamctrl -stop
To stop a remote HAM, use the -node option to the hamctrl utility:
hamctrl -node "nodename" -stop
To stop the HAM programmatically using the API, use the following functions:
/* terminate */ int ham_stop(void); int ham_stop_nd(int nd); int ham_stop_node(const char *nodename);