From 72a11f23ebbbc204213c8b339e32ed6082d5ea50 Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Tue, 31 Aug 2010 15:13:29 +0200 Subject: Update erl_interface doc and testsuite for epmd changes --- lib/erl_interface/doc/src/ei_connect.xml | 27 +++++++++++++++------------ lib/erl_interface/doc/src/erl_connect.xml | 29 ++++++++++++++++------------- lib/erl_interface/test/ei_accept_SUITE.erl | 4 ++-- 3 files changed, 33 insertions(+), 27 deletions(-) diff --git a/lib/erl_interface/doc/src/ei_connect.xml b/lib/erl_interface/doc/src/ei_connect.xml index 927395d1bf..16439510cc 100644 --- a/lib/erl_interface/doc/src/ei_connect.xml +++ b/lib/erl_interface/doc/src/ei_connect.xml @@ -4,7 +4,7 @@
- 20012009 + 20012010 Ericsson AB. All Rights Reserved. @@ -508,7 +508,7 @@ if (ei_decode_version(result.buff, &index) < 0 same as the port number that was previously bound to the socket.

is the 32-bit IP address of the local host.

To unregister with epmd, simply close the returned - descriptor. See also .

+ descriptor. Do not use , which is deprecated anyway.

On success, the functions return a descriptor connecting the calling process to epmd. On failure, they return -1 and set to .

@@ -558,18 +558,21 @@ typedef struct { intei_unpublish(ei_cnode *ec) - Unpublish a node name + Forcefully unpublish a node name

This function can be called by a process to unregister a - specified node from epmd on the localhost. This may be - useful, for example, when epmd has not detected the failure of a - node, and will not allow the name to be reused. If you use this - function to unregister your own process, be sure to also close - the descriptor that was returned by .

- -

Careless use of this function may have unpredictable - results, if the registered node is in fact still running.

-
+ specified node from epmd on the localhost. This is however usually not + allowed, unless epmd was started with the -relaxed_command_check + flag, which it normally isn't.

+ +

To unregister a node you have published, you should + close the descriptor that was returned by + .

+ + +

This function is deprecated and will be removed in a future + release.

+

is the node structure of the node to unregister.

If the node was successfully unregistered from epmd, the function returns 0. Otherwise, it returns -1 and sets diff --git a/lib/erl_interface/doc/src/erl_connect.xml b/lib/erl_interface/doc/src/erl_connect.xml index b2235925b2..bd5e637244 100644 --- a/lib/erl_interface/doc/src/erl_connect.xml +++ b/lib/erl_interface/doc/src/erl_connect.xml @@ -4,7 +4,7 @@

- 19962009 + 19962010 Ericsson AB. All Rights Reserved. @@ -451,7 +451,7 @@ typedef struct {

is the local name to register, and should be the same as the port number that was previously bound to the socket.

To unregister with epmd, simply close the returned - descriptor. See also . + descriptor.

On success, the functions return a descriptor connecting the calling process to epmd. On failure, they return -1 and set @@ -507,21 +507,24 @@ typedef struct { interl_unpublish(alive) - Unpublish a node name + Forcefully unpublish a node name char *alive; -

This function can be called by a process to unregister a - specified node name from epmd on the localhost. This may be - useful, for example, when epmd has not detected the failure of a - node, and will not allow the name to be reused. If you use this - function to unregister your own process, be sure to also close - the descriptor that was returned by .

- -

Careless use of this function may have unpredictable - results, if the registered node is in fact still running.

-
+

This function can be called by a process to unregister a + specified node from epmd on the localhost. This is however usually not + allowed, unless epmd was started with the -relaxed_command_check + flag, which it normally isn't.

+ +

To unregister a node you have published, you should instead + close the descriptor that was returned by + .

+ + +

This function is deprecated and will be removed in a future + release.

+

is the name of the node to unregister, i.e., the first component of the nodename, without the .

If the node was successfully unregistered from epmd, the diff --git a/lib/erl_interface/test/ei_accept_SUITE.erl b/lib/erl_interface/test/ei_accept_SUITE.erl index bc83d6a62e..98fe272394 100644 --- a/lib/erl_interface/test/ei_accept_SUITE.erl +++ b/lib/erl_interface/test/ei_accept_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2009. All Rights Reserved. +%% Copyright Ericsson AB 2001-2010. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -72,7 +72,7 @@ ei_accept(Config) when is_list(Config) -> after 1000 -> io:format("timeout ~n") end, - ?line ok= ei_unpublish(P), + ?line runner:finish(P), ok. ei_threaded_accept(Config) when is_list(Config) -> -- cgit v1.2.3