[erlang-questions] How to properly declare a special process in supervisor's child specification?

Sergey S ad.sergey@REDACTED
Wed Jan 21 00:17:34 CET 2009


Hello.

Saying "special process" I mean a process implemented using
proc_lib/sys facilities as illustrated in OTP Design Principles.

What should I use in "Modules" placeholder of child specification:

    child_spec() = {_, _, _, _, _, Modules}

[Module] or dynamic?

erl -man supervisor doesnt' give the answer:

-------------------8<-------------------
"As a rule of thumb Modules should be a list with one element
[Module], where Module is the callback module, if the child process is
a >>> supervisor, gen_server or gen_fsm <<<. If the child process is
an >>> event  manager  (gen_event) <<< with a dynamic set of callback
modules, Modules should be dynamic."
-------------------8<-------------------

But my process isn't supervisor, gen_server, gen_fsm nor gen_event.
But it's implemented to work like gen_server...

OTP Design Principles also says nothing about that (or at least I
didn't find anything making this clear)

I'm using "dynamic" now, but I'm not sure that it's right.

--
Sergey



More information about the erlang-questions mailing list