Monitoring of nodes..

Martin Bjorklund mbj@REDACTED
Wed May 17 09:15:29 CEST 2000


Pekka.Hedqvist@REDACTED wrote:
> What have I missed if I have three (3) nodes <a@REDACTED,b@REDACTED,c@REDACTED>, they
> are all "connected" with each other. Node 'a@REDACTED' does BIF calls to
> monitor_node(b@REDACTED, true) and monitor_node(c@REDACTED,true). Now node
> 'a@REDACTED' monitors both node 'b@REDACTED' and node 'c@REDACTED'. If I terminate
> node 'b@REDACTED', node 'a@REDACTED' should receive an {nodedown, b@REDACTED} message
> which it does. 
> BUT, if I then terminate the 'c@REDACTED' node I do NOT receive any
> {nodedown, c@REDACTED} message. Now, is this the correct behaviour? It's
> not what I expected anyway..?

I've tried this as well, and it seems to work just fine:

(a@REDACTED)1> nodes().
[c@REDACTED,b@REDACTED]
(a@REDACTED)2> erlang:monitor_node(b@REDACTED, true).
true
(a@REDACTED)3> erlang:monitor_node(c@REDACTED, true).
true

  terminating b@REDACTED

(a@REDACTED)4> flush().
Shell got {nodedown,b@REDACTED}
ok

  terminating c@REDACTED


(a@REDACTED)5> flush().
Shell got {nodedown,c@REDACTED}
ok

Could you post your program?



/martin



More information about the erlang-questions mailing list