Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ham_en/ham/hamapi/ham_stop.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ham_en/ham/hamapi/ham_stop.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ham_en/ham/hamapi/ham_stop.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ham_en/ham/hamapi/ham_stop.html on line 8

ham_stop(), ham_stop_nd(), ham_stop_node()

Stop the HAM

Synopsis:

#include <ha/ham.h>

int ham_stop( void );
int ham_stop_nd( int nd);
int ham_stop_node( const char *nodename);

Library:

libham

Description:

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.


Note: Since node identifiers are transient objects, you should obtain the value for nd immediately before the call, using netmgr_strtond() or another function that converts nodenames into node identifiers.

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.

Returns:

0
Success.
-1
An error occurred (errno is set).

Errors:

EBADF
Couldn't connect to the HAM.

In addition to the above, the HAM returns any error it encounters while servicing the request to terminate.

Classification:

QNX Neutrino

Safety:
Cancellation point No
Interrupt handler No
Signal handler No
Thread Yes

Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ham_en/ham/hamapi/ham_stop.html on line 137

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ham_en/ham/hamapi/ham_stop.html on line 137