OTP Supervisor Question

Jayson Vantuyl kagato@REDACTED
Mon Jan 4 03:31:52 CET 2010


If I'm an OTP-style process (say, a gen_server), and I want to know who my parent is (say, a supervisor), is this possible using any API, or do I need to pass in the Parent explicitly?  Is using supervisor:get_child a good way to find a process's sibling?  Would it be better to start a single gen_server and have it use normal, linked processes?

I have a certain automaton that is represented as a group of three processes.  These processes coordinate and there may be multiple automata on a single node.  I want to put them under a single supervisor, but I'm struggling a bit to get them to all know each other's PIds without adding code to the supervisor (which is bad, right?) and without having to locally register them (which would prevent multiple automata per node).

Thanks,

-- 
Jayson Vantuyl
kagato@REDACTED







More information about the erlang-questions mailing list