Linking two Pids of nodes that are in the same machine - noconnection signal!

Inswitch Solutions - Erlang Evaluation <>
Thu Sep 30 14:46:46 CEST 2004


The attached code links to pids of nodes that are in the same machine and I don't know why I receive a noconnection signal when the LAN cable is disconnected. This does no happen when running the code with the LAN cable disconnected and connecting/disconnecting it later.

If someone wants to give a try,  I send a code to test this situation and you should modify on node1.erl the blue text line below:
{node2Pid, } ! {self()},
with the corresponding machine name where you will run it.


On the same machine do the following:

1 - "erl -sname node2"
2 - "node2:start()."

2 - "erl -sname node1"
3 - "node1:start()."
 
4 - The pid is linked and a message is shown on node1.
5 - node2Pid shows a message every 1 sec while checking the queue message
6 - node1 process loops checking the queue message 

7 - Disconnect LAN cable
8 - node2Pid receives a noconnection signal
9 - node1 process receives an {'EXIT',Pid,noconnection}


- When linking Pids of different nodes that are in the same machine why do I receive a "noconnection" signal?
- Having the LAN cable disconnected and doing steps 1..6 8..9, if I connect/disconnect the LAN cable the "noconnection" signal is never received (correct behaviour). 
- If in the source code I do not use "process_flag(trap_exit, true),"  the processes terminate, why is this happenning as no kill signal is sent?


thanks in advance,
Eduardo Figoli
INSwitch Solutions




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20040930/65892a8e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: node2.erl
Type: application/octet-stream
Size: 569 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20040930/65892a8e/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: node1.erl
Type: application/octet-stream
Size: 498 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20040930/65892a8e/attachment-0001.obj>


More information about the erlang-questions mailing list