global_name_server question.

Vladimir Ulogov gandalf@REDACTED
Wed Jun 2 21:09:15 CEST 1999

I'd have another dumb question about "registered" process.
Here is a erlang code:
start() ->
     Rec = spawn(dumb_eh, receiver, []),
     register(eh, Rec).
receiver() ->
         Message ->
	     io:format("Recv: ~w~n", Message),
This dumb handler working just fine:
(server@REDACTED)16> eh!{boo, baa, foo, bar,42}.
And regs(). returns exactly what I'm expected:
global_name_server    <0.11.0> {global,init,1} 52 0
eh                    <0.62.0> {dumb_eh,receiver,0}  106 0
I did tried to send erl_reg_send, it seems like eh do not received any
messages. I did create small tool:
#include "erl_interface.h"
#include "ei.h"
int main(int argc, char **argv) {
   int sockfd;
   char **names;
   int count;
   erl_init(NULL, 0);
   erl_connect_init(42, "thecookie", 0);
   sockfd = erl_connect("server@REDACTED");
   names = erl_global_names(sockfd, &count);
   printf("%d,%d\n", sockfd, count);
And count returns 0. May be you'll tell to me, what I did wrong.

Vladimir I. Ulogov (gandalf@REDACTED)
tel: 973-236-6464 or 6463
fax: 973-236-2090
"Where lands meets water. Where earth meets air. Where body meets
mind. Where space meets time. We like to be on one side, and look 
at the other." D.Adams "Mostly harmless"

More information about the erlang-questions mailing list