[erlang-questions] How do I start gproc in a global way?

Ulf Wiger ulf@REDACTED
Wed Dec 14 00:10:54 CET 2011

The answer is in the code…


That is, use e.g. erl -gproc gproc_dist Opts

where the simplest setting is -gproc gproc_dist all


You can set Opts to all | Nodes | {Nodes, GenLeaderOpts}

What GenLeaderOpts are depends a litre bit on which gen_leader you use.

As gen_leader doesn't handle net splits, you should ensure that nodes connect _before_ you start gproc_dist.

Ulf W

On 13 Dec 2011, at 23:30, Torben Hoffmann wrote:

> Hi,
> I am trying to do a gproc:reg({n,g,somename}), but all I get for Christmas is:
> CRASH REPORT Process <0.944.0> with 0 neighbours crashed with reason: {local_only,[{gproc,reg,2},{sb_coordinator,init,1},{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}
> I guess that gproc has to be started with some global mindset before I can use global names, but I cannot figure out how to provide that argument.
> I am using rebar so my second guess is that I need to change my apps .app.src file and put the correct thing into the env list.
> I have tried to read the documentation, but I have so far failed to figure out how to do this and google has not been kind to me tonight.
> Any advice is most welcome!
> Cheers,
> Torben
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

More information about the erlang-questions mailing list