[erlang-questions] Using supervisor:start_child without an id

Jesper Louis Andersen <>
Mon Jun 14 23:56:42 CEST 2010


On Mon, Jun 14, 2010 at 11:54 PM, gershon bialer
<> wrote:

> As I understand it, OTP supervisors require an id for every process
> supervised. Since:
>
> child_spec() = {Id,StartFunc,Restart,Shutdown,Type,Modules}.
>
> However, I don't want to create an Id everytime, I add a process. Is
> there anyway to add child processes to a supervisor, without creating
> a new id?

simple_one_for_one supervisors might be what you want. Read their
documentation carefully as they are a tad different from normal
id-given supervised processes.


-- 
J.


More information about the erlang-questions mailing list