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_disconnect.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_disconnect.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_disconnect.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_disconnect.html on line 8
Disconnect from the HAM
#include <ha/ham.h>
int ham_disconnect( unsigned flags);
int ham_disconnect_nd( int nd, unsigned flags);
int ham_disconnect_node( const char *nodename, unsigned flags);
libham
The ham_disconnect() function closes a previously
open connection to a HAM.
The ham_disconnect_nd() and ham_disconnect_node()
functions close previously opened connections to remote HAMs.
The nd specified to ham_disconnect_nd
is the node identifier of the remote node at the time the
ham_disconnect_nd() call is made.
|
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_disconnect_node() function takes as a parameter
a fully qualified node name (FQNN).
Because the library maintains a reference count, the actual
connection to the HAM is released only when the number of
calls made to ham_disconnect() matches the number
of calls previously made to ham_connect().
When a process calls
ham_connect()
and then calls
fork(),
the connection is no longer valid in the child process.
To reconnect to the HAM, the child process must call either:
- ham_connect()
directly, which will automatically close the existing connection
and reopen a new one
or:
- ham_disconnect(), followed by
ham_connect().
There are no flags defined at this time.
- 0
- Success.
- -1
- An error occurred (errno is set).
- EINVAL
- There's no valid connection to the HAM to disconnect.
QNX Neutrino
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |
ham_attach_self(),
ham_connect(),
ham_connect_nd(),
ham_connect_node(),
ham_stop()
In the Library Reference:
fork()
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_disconnect.html on line 170
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_disconnect.html on line 170